You need to sign in to do that
Don't have an account?
thomsant
Apex Scheduler --Very urgent
Hi All I am trying run the scheduler every minuter and it does not seem to run and and not able to see the instance in the logs . Is there any we need to start the scheduler /or any other setting needs to be done . How will this scheduler be called ? Help really appreciated ., below is the code Tom global class Scheduled_Account_Migrate { global void execute(SchedulableContext SC) { Migrate_Account_Class_Batch Acc = new Migrate_Account_Class_Batch(); // Acc.setPCAccount(); String sch = '0 * * * * * *'; system.schedule('Merge Job', sch, Acc); } }
thomsant - once you submit the scheduler job via System Log, that is a "one-and-done" activity, unless you need to modify the code that is being executed. If you need to modify your code, you need to delete the job, edit your code, and re-run the scheduler code from System Log.
If you need to stop the job for whatever reason, you can delete the schedule from Setup -> Monitoring -> Scheduled Jobs.
Does that help?
All Answers
Hi Tom,
Two things,
1 - Are you executing the scheduler triggering code line from System log? This is important.
If not, please execute this in your system log -
String sch = '0 * * * * * *';
system.schedule('Merge Job', sch, Acc);
2- You cannot run your scheduler peer minute by the code above because you can't use '*' in minute place. For this to happen, you have to use some different way. May be triggering more than one schedulers. :)
Thanks,
Shailesh Patil
Refer : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
thomsant - once you submit the scheduler job via System Log, that is a "one-and-done" activity, unless you need to modify the code that is being executed. If you need to modify your code, you need to delete the job, edit your code, and re-run the scheduler code from System Log.
If you need to stop the job for whatever reason, you can delete the schedule from Setup -> Monitoring -> Scheduled Jobs.
Does that help?
delete the job first and then try to Modify ur class
i.e.
Setup -> Monitoring -> Scheduled Jobs-> Click Delete Against you Job Name that u have scheduled.
hope it will work.