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
ganeshjujjuruganeshjujjuru 

How can i execute schedule class per every one hour

I want to execute schedule class per every one hour from developer console..? how can i run this class every one hour can any body help how can i achiee this...?

Arun MKArun MK

Hi,

 

Tru to execute the following code in your developer console. Replace YourScheduleClass ith your schedule class name.

 

YourScheduleClass p = new YourScheduleClass();

System.schedule('Daily 00 Past','0 * 0 * * ? ', p);

System.schedule('Daily 01 Past','0 * 1 * * ? ', p);

System.schedule('Daily 02 Past','0 * 2 * * ? ', p);

System.schedule('Daily 03 Past','0 * 3 * * ? ', p);

System.schedule('Daily 04 Past','0 * 4 * * ? ', p);

System.schedule('Daily 05 Past','0 * 5 * * ? ', p);

System.schedule('Daily 06 Past','0 * 6 * * ? ', p);

System.schedule('Daily 07 Past','0 * 7 * * ? ', p);

System.schedule('Daily 08 Past','0 * 8 * * ? ', p);

System.schedule('Daily 09 Past','0 * 9 * * ? ', p);

System.schedule('Daily 10 Past','0 * 10 * * ? ', p);

System.schedule('Daily 11 Past','0 * 11 * * ? ', p);

System.schedule('Daily 12 Past','0 * 12 * * ? ', p);

System.schedule('Daily 13 Past','0 * 13 * * ? ', p);

System.schedule('Daily 14 Past','0 * 14 * * ? ', p);

System.schedule('Daily 15 Past','0 * 15 * * ? ', p);

System.schedule('Daily 16 Past','0 * 16 * * ? ', p);

System.schedule('Daily 17 Past','0 * 17 * * ? ', p);

System.schedule('Daily 18 Past','0 * 18 * * ? ', p);

System.schedule('Daily 19 Past','0 * 19 * * ? ', p);

System.schedule('Daily 20 Past','0 * 20 * * ? ', p);

System.schedule('Daily 21 Past','0 * 21 * * ? ', p);

System.schedule('Daily 22 Past','0 * 22 * * ? ', p);

System.schedule('Daily 23 Past','0 * 23 * * ? ', p);


If this post is helpful please throw Kudos.
If this post solves your problem kindly mark it as solution.


Regards,

Arun