Someone know how to cron a salesforce job every 3 months, on the 1st at 9am? any ideas?

  • Unfortunately, we cannot use /3 or something like that, so I'm afraid you'll to schedule your job 4 times. Or you could schedule it on the first of each month, and change the code so that it just returns in the months it should not run.
    – rael_kid
    Mar 7 '19 at 11:19
  • how can I schedule on the 1st of x month?
    – user64257
    Mar 7 '19 at 11:20
  • By using the cron expression 0 0 9 1 x ? *. The first three digits are the time, so 0 seconds, 0 minutes, 9 hours, the last four are for the day, so first of the month, x-th month, no specifier for day of the week and every year. Also check the documentation for Apex Schedules: developer.salesforce.com/docs/atlas.en-us.apexcode.meta/…
    – rael_kid
    Mar 7 '19 at 11:23
  • Thank you very much
    – user64257
    Mar 7 '19 at 11:24
  • Right, turns out I was wrong, you can use 1/3 to schedule every third month. See Mahmood's answer.
    – rael_kid
    Mar 7 '19 at 11:38

You will need to schedule using cron expression, something like

apexScheduledJob j = new apexScheduledJob ();
String sch = '0 0 9 1 1/3 ? *';
System.schedule('My Job', sch, j);

Use cronmaker to generate crons for any requirement.


Cross posting for duplicate question on Salesforce Stackexchange.

Salesforce: how to schedule a task to run on the first day of every quarter

you can check this link for reference. and please before posting something here you can surf something then you can get those available solutions.

  • You are right, this is a duplicate. Can you please remove your anwer and put it in the comments section of the question?
    – Mahmood
    Mar 7 '19 at 11:46
  • i can not able do that anyway, your answer helped him Good.
    – Umesh Beti
    Mar 7 '19 at 11:49
  • Actually I was referring to your answer, so if you remove your answer and put it as a comment , it would make more sense.
    – Mahmood
    Mar 7 '19 at 12:11