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
prakashedlprakashedl 

System.schedule Exception help

I am trying to invoke system.schedule method. The first parameter is name of the schedule, second is the schedule string and third is the instance of the apex class that implements Schedulable interface.

 

The schedule string is the following

 

'58 0 20 12 5 ? 2010'

 

I get an exception saying System.Exception: trigger must be associated with a job detail

 

Has anyone encountered this exception before? Any idea where i could be missing? Any help would be appreciated.

 

3:0:57.407|METHOD_ENTRY|[109,32]|system.schedule(String, String, scheduleActiveQChecker)
3:0:57.450|EXCEPTION_THROWN|[109,32]|System.Exception: trigger must be associated with a job detail
3:0:57.450|METHOD_EXIT|[109,32]|schedule(String, String, APEX_OBJECT)

Best Answer chosen by Admin (Salesforce Developers) 
wsmithwsmith

I had this problem too.  It turns out I had a space at the end of the Job Name.

i.e.: System.schedule('Calculate Case Age Minutes ', sch, s);

 

I removed the space and it worked after that.

i.e.: System.schedule('Calculate Case Age Minutes', sch, s);

All Answers

Sami CohenSami Cohen

Hi,

 

We encountered the same error.

Did you find any workaround? It used to work for us before the last release (summer 10).

Now this is not working.

 

 

Thanks,

wsmithwsmith

I had this problem too.  It turns out I had a space at the end of the Job Name.

i.e.: System.schedule('Calculate Case Age Minutes ', sch, s);

 

I removed the space and it worked after that.

i.e.: System.schedule('Calculate Case Age Minutes', sch, s);

This was selected as the best answer
Krishna Prasad K PKrishna Prasad K P

Thanks wsmith.  Your input really helped  :)

nov supnov sup

Thanks!

Great help

Andrew DIAndrew DI

Or at the beginning...

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