Not for the first time I've drawn a blank with the Salesforce documentation and feel like I'm asking a simple question.
I have written an Apex class that implements Schedulable. The job will be part of a managed package. I would now like to schedule the job. This is the sample code from the documentation. Where should said code be located / run?
I want to run the job frequently, e.g. every 5 minutes.
Documentation: http://www.salesforce.com/us/developer/docs/apexcode/index.htm
To schedule the job every 5 minutes I could not use standard cron syntax. This is how I got it to work every 5 minutes:
UpdateJobSchedule updater = new UpdateJobSchedule();
String sch='0 0 * * * ?';
String jobID = system.schedule('Update job 00', sch, updater);
sch='0 5 * * * ?';
jobID = system.schedule('Update job 05', sch, updater);
sch='0 10 * * * ?';
jobID = system.schedule('Update job 10', sch, updater);
sch='0 15 * * * ?';
jobID = system.schedule('Update job 15', sch, updater);
sch='0 20 * * * ?';
jobID = system.schedule('Update job 20', sch, updater);
sch='0 25 * * * ?';
jobID = system.schedule('Update job 25', sch, updater);
sch='0 30 * * * ?';
jobID = system.schedule('Update job 30', sch, updater);
sch='0 35 * * * ?';
jobID = system.schedule('Update job 35', sch, updater);
sch='0 40 * * * ?';
jobID = system.schedule('Update job 40', sch, updater);
sch='0 45 * * * ?';
jobID = system.schedule('Update job 45', sch, updater);
sch='0 50 * * * ?';
jobID = system.schedule('Update job 50', sch, updater);
sch='0 55 * * * ?';
jobID = system.schedule('Update job 55', sch, updater);