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
Vamsee KaramchetiVamsee Karamcheti 

Can't schedule class in production ?

I can schedule a class in Sandbox but not in production. It showing error like "An error has occurred in the following section: [Exception, InvalidScheduledApexClass]. Salesforce.com has been notified of this error."

Can any one help me on this ?
Lokesh KumarLokesh Kumar
HI Vamsee,

Please check your class has All the methods and class having global access specifier and make sure you are scheduling through code
 
//For hourly job
String CRON_EXP = '0 0 * * * ?';
   scheduleforAccount sch = new scheduleforAccount();
   system.schedule('Schedule', CRON_EXP, sch);

Or, Share your code i will help you.

Thanks
Lokesh