Trigger must be associated with a job detail error while scheduling the batch job
Problem: This error occurred while scheduling the batch job using cron expression.
System.schedule('Schedule Batch Job that runs only once after 5 mins ', '0 '+sMinute+' '+sHour+' '+sDayOfMonth+' '+sMonth+' ?'+' '+sYear, new AccountUpdatorBatchSchedular());
Solution: Notice in the above sample code, there is space after the name of the job i.e Schedule Batch Job that runs only once after 5 mins.
When I remove extra spaces,I was able to resolve the issue.
System.schedule('Schedule Batch Job that runs only once after 5 mins', '0 '+sMinute+' '+sHour+' '+sDayOfMonth+' '+sMonth+' ?'+' '+sYear, new AccountUpdatorBatchSchedular());
Problem: This error occurred while scheduling the batch job using cron expression.
System.schedule('Schedule Batch Job that runs only once after 5 mins ', '0 '+sMinute+' '+sHour+' '+sDayOfMonth+' '+sMonth+' ?'+' '+sYear, new AccountUpdatorBatchSchedular());
Solution: Notice in the above sample code, there is space after the name of the job i.e Schedule Batch Job that runs only once after 5 mins.
When I remove extra spaces,I was able to resolve the issue.
System.schedule('Schedule Batch Job that runs only once after 5 mins', '0 '+sMinute+' '+sHour+' '+sDayOfMonth+' '+sMonth+' ?'+' '+sYear, new AccountUpdatorBatchSchedular());
No comments:
Post a Comment