Mar 5, 2011

Error : "Trigger must be associated with a job detail"

Hi All,

While scheduling a class we some times gets error "Trigger must be associated with a job detail".

For example: I was facing this error when I schedule my class "ScheduleClass" using System.schedule, giving name to the schedule job "One Time ".

ScheduledClass SC = new ScheduledClass() ;
String sch = '0 0 10 * * ?';
System.schedule('One Time ', sch, SC);

Now please notice there is a space after "One Time ", when I removed this extra space from the name ("One Time") my class was scheduled as expected.