You need to sign in to do that
Don't have an account?
davidjbb
Scheduler
Hello,
Is there a way to create records of a object based on a certain time ? For example, if it's 12am the Work Order object will create X number(X number depends) of Work Orders based on the time? Any tips or feedback on how to get this going would be most appreciated.
Cheers,
Davidjbb
Hi,
You have to simply write all the logic inside the schedule class. It’s like a simple class that implement scheduling and you have to write all the logic inside the execute method.
Try the below code as reference:
global class getStockPrice implements Schedulable
{
global void execute(SchedulableContext ctx)
{
// put for logic here.
}
}
For more detail follow the below link:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.