+ Start a Discussion

cron expression to run weekly

I used below cron expression to schedule my job weeky to run at 1 AM.  I dont see anything wrong the below cron expression

'0 1 ? * 0 *'

I get this exception

'?' can only be specified for Day-of-Month or Day-of-Week.. Can anyone tell what is the correct for this.

Best Answer chosen by Admin (Salesforce Developers) 

Ok. I was looking at cron from unix...it is missing seconds. I believe salesforce includes seconds sp i have to add 0 before...


I working weekly is 0 0 1 ? * 0 *