I want to run a class at 10 AM every 2nd and 4th Friday of each month. Came up with the expression below, but it's not scheduling correctly - only schedules the fourth Friday. Could it be that comma-separated syntax is not handled properly by Salesforce Scheduler in the Weekday attribute?

Here is what I have: '0 0 10 ? * 6#2,6#4'

As a workaround, I could schedule two separate jobs, but still would like to know the right expression for the above.

  • I think you need to tag this as "bug", because it's certainly not behaving as per the documentation.
    – sfdcfox
    Aug 29, 2014 at 17:27

1 Answer 1


The documentation suggests that it does support the syntax, and no error arises when you use it (so, it's accepted by the parser), but it appears you'll have to have to separate scheduler, because it will only schedule it for one day a month.

I also tried "0 0 10 ? * 6#2,4." It lets me manage it (in Scheduled Jobs) as the "second Sunday of every month" with a next execution time of September 10th-- Wednesday. The cron string is perfectly preserved in the CronTrigger object, but it appears to have problems parsing various combinations of strings that should be legal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .