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.


Thanks

8 comments:

  1. ohh dats gr8 tip
    it works perfectly
    i cud never interpret it..

    ReplyDelete
  2. How to update a field from vf page....?

    ReplyDelete
  3. This is an internal SFDC bug. Let's vote for this idea https://success.salesforce.com/ideaView?id=08730000000DpYoAAK to make them fix it

    ReplyDelete
  4. Great it works for me too

    ReplyDelete