5

This blog post - https://developer.salesforce.com/blogs/engineering/2014/10/new-apex-queueable-interface.html - suggests that Queueable should be used in place of Schedulable from now on to avoid suicidal scheduling.

However, with scheduled jobs, you can set the start time. So I have a scheduled job that runs, schedules another job to start in 5 minutes and then aborts itself.

Is it possible to implement this kind of delay/start time approach with the Queueable interface? Or do chained Queueable jobs always run immediately?

1 Answer 1

4

Queueable run as fast as possible once they are enqueued (System.enqueueJob()).

Queueable has some benefits over using @future, the other aysnc "immediate" execution path, but neither has the delay you are looking for.

Schedulable is what you want if you want a delay.

You must log in to answer this question.

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