You need to sign in to do that
Don't have an account?
Riothamus
Scheduling jobs to run every few minutes
Hi,
I have a background job that needs to run every few minutes to populate a database (there are multiple database and HTTP calls, so it needs to be run in increments to stay under Salesforce limits), but the Salesforce setup page doesn't allow scheduling jobs except weekly or monthly.
Is there a way around this? I was thinking of having the job get the current time, add 5 minutes, and then schedule the next job before it does its work.
Are there better solutions?
Hi,
You can achieve this through cron expression.
For more details please go through the below link.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
Regards,
Sridhar Bonagiri
While the original response is correct, please be mindful that execution windows are "as available" (execution may be delayed a few minutes), and you will be unable to schedule any more frequently than about 7 minutes, because, like CRON, the batch handler thread only wakes up periodically to perform actions; it does not constantly monitor the database for actions that need to be performed.