function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AmitSahuAmitSahu 

Schedule job in every 15 min.

Hi Devs',

 

How can I change the parameters in this line below so that it will run every 15 min. It seems to me that at the minimum we can run the job every 1 hours. Please let me know if I am correct ....

 

System.schedule('Stock Price Update', '0 0 1-23 * * ?', new getStockPrice());

 

Thanks,

 

 

Best Answer chosen by Admin (Salesforce Developers) 
olegforceolegforce
you don't do dml operation. you need to use system.abort() and also system.schedule()

All Answers

__

you need to write a class that will delete your scheduled job at the end of it and schedule new one to run in 15 minutes

AmitSahuAmitSahu

Humm ..... But Schedule Jobs object is only queryable we cannot update /insert records to it..... Still looking for some answer.

olegforceolegforce
you don't do dml operation. you need to use system.abort() and also system.schedule()
This was selected as the best answer
AmitSahuAmitSahu

Great help.....Thank you very much.....

 

Regards,

 

J


OXYEHHO wrote:
you don't do dml operation. you need to use system.abort() and also system.schedule()