0

I would like to run my batch job at 12.30 PM IST daily, but the UI provides only hourly timings which doesn't suit my scenario.

2 Answers 2

2

You need to use apex code to start the schedule.

System.schedule('NewJob', '0 30 12 * * ?', new YourScheduleJobObj());
3
  • Does the job automatically show up in the scheduled jobs list once the apex class is saved?
    – Sneha
    Commented Aug 2, 2019 at 8:25
  • 1
    @sneha - job appears on list once the above Apex is executed (e.g. in anonymous apex)
    – cropredy
    Commented Aug 2, 2019 at 22:22
  • Thank you, it worked :)
    – Sneha
    Commented Aug 5, 2019 at 6:25
0

To expand on what Lance said, the System.schedule method allows you to configure execution of Schedulable implementations using a cron-based date/time specification.

There are specific limits on what you can do here, such as the inability to define multiple minute specs in one go (so you can't schedule the job to run every 15 minutes at 0, 15, 30 and 45 mins past the hour in a single go).

You can execute this call via anonymous apex or in some existing code that is run on your org. You can even add a check to see if the job is already scheduled and to skip trying to re-schedule it in that case.

You will find additional information about this method and the cron specification supported in the documentation.

1
  • Thanks for the information!
    – Sneha
    Commented Aug 5, 2019 at 6:26

You must log in to answer this question.

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