You need to sign in to do that
Don't have an account?
Gaurav Agnihotri
Schedulable class
Hi,
I need to schedule following code:
I was wondering if someone could recommend me the best way to schedule. Should I create a new class that implements Schedulable
Any suggestions?
I need to schedule following code:
tempuriOrg.QantelDataServiceEndPoint NewTempUri= new tempuriOrg.QantelDataServiceEndPoint(); NewTempUri.ProcessWarehouseInventory('username','password');
I was wondering if someone could recommend me the best way to schedule. Should I create a new class that implements Schedulable
Any suggestions?
You need to use the @future annotation. See http://blog.sforce.com/sforce/2010/02/spring-10-saw-the-general-availability-of-one-of-my-favorite-new-features-of-the-platform-the-apex-schedulerwith-the-apex-s.html for an example
Hope this helps
--
Thanks,
Swayam
All Answers
You can create below Sample Class
And Schdule this class either using UI (https://help.salesforce.com/apex/HTViewHelpDoc?id=code_schedule_batch_apex.htm)
or using running below code in Execute anonymous block:
Hope this help
--
Thanks,
Swayam
1) Apex Scheduler
https://developer.salesforce.com/docs/atlas.en-us.apex_workbook.meta/apex_workbook/apex_scheduling_1.htm
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm The following example uses the System.Schedule method to implement the above class.
2) How to Schedule
https://help.salesforce.com/apex/HTViewHelpDoc?id=code_schedule_batch_apex.htm
You can only have 100 active or scheduled jobs concurrently.
3) Scheduling and Monitoring Scheduled Jobs
https://developer.salesforce.com/docs/atlas.en-us.apex_workbook.meta/apex_workbook/apex_scheduling_3.htm
4) Adding a Test for the Schedulable Class
https://developer.salesforce.com/docs/atlas.en-us.apex_workbook.meta/apex_workbook/apex_scheduling_2.htm
When I am running this job after making recommeded changes in class, the schedule job is failing with "Aborted" status.
Any idea why?
Can your debug log, may be you are getting some exception
Scheduler: failed to execute scheduled job: jobId: 7077A0000040txp, class: common.apex.async.AsyncApexJobObject, reason: Callout from scheduled Apex not supported.
Here is the class: Any suggestions?
You need to use the @future annotation. See http://blog.sforce.com/sforce/2010/02/spring-10-saw-the-general-availability-of-one-of-my-favorite-new-features-of-the-platform-the-apex-schedulerwith-the-apex-s.html for an example
Hope this helps
--
Thanks,
Swayam
woohoo!!
Thanks everyone.