Error : "Trigger must be associated with a job detail"
Error : "Trigger must be associated with a job detail"
Hi All,
I was just trying to schedule my schedulable class 'Schedular_GlobalAppLogPurgeBatch' in Apex. That time I was facing this error.
Error : "Trigger must be associated with a job detail"
e.g.
Schedular_GlobalAppLogPurgeBatch globalPurgeBatchSchedular = new Schedular_GlobalAppLogPurgeBatch();
System.schedule('Global App Logs Purge ', '0 0 * * * ? *', globalPurgeBatchSchedular);
you can notice there is a space after "Global App Logs Purge ", when I removed this extra space from the name ("Global App Logs Purge") my class was scheduled as expected.
Corrected Space from code:
Schedular_GlobalAppLogPurgeBatch globalPurgeBatchSchedular = new Schedular_GlobalAppLogPurgeBatch();
System.schedule('Global App Logs Purge', '0 0 * * * ? *', globalPurgeBatchSchedular);
I hope this will help you.
Hi All,
I was just trying to schedule my schedulable class 'Schedular_GlobalAppLogPurgeBatch' in Apex. That time I was facing this error.
Error : "Trigger must be associated with a job detail"
e.g.
Schedular_GlobalAppLogPurgeBatch globalPurgeBatchSchedular = new Schedular_GlobalAppLogPurgeBatch();
System.schedule('Global App Logs Purge ', '0 0 * * * ? *', globalPurgeBatchSchedular);
you can notice there is a space after "Global App Logs Purge ", when I removed this extra space from the name ("Global App Logs Purge") my class was scheduled as expected.
Corrected Space from code:
Schedular_GlobalAppLogPurgeBatch globalPurgeBatchSchedular = new Schedular_GlobalAppLogPurgeBatch();
System.schedule('Global App Logs Purge', '0 0 * * * ? *', globalPurgeBatchSchedular);
I hope this will help you.
Comments
Post a Comment