string CRON_EXP = '0 30 * ? * MON-FRI';
string jobid=System.Schedule('<<any name>>',CRON_EXP, new <<name of class>>());
This will run the class every 30 mins passed the hour from Mon-Fri
This will run the class every 30 mins passed the hour from Mon-Fri
Changing the 1st line with
CRON_EXP = '0 0 * ? * MON-FRI';
will run the class on the hour
More info for specific customisation at http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_system.htm
No comments:
Post a Comment
Note: only a member of this blog may post a comment.