System.AsyncException: trigger must be associated with a job detailI am writing test class for schedule and bump into this exception.The reason is , make sure no space at jobName. The class can be call by :
System.schedule(jobName, cronExpression, schedulableClass) ;
Notice this will throw the exception . 'Opp_Update_Schedule 5.00 '
// Schedule the test job String jobId = System.schedule('Opp_Update_Schedule 5.00 ', CRON_EXP_DAY, new Opportunity_Update_Schedule(100));
This will not throw exception :'Opp_Update_Schedule'. Remove space, I haven't test with special character (you might want to test) but I remove it anyway and it run.
// Schedule the test job String jobId = System.schedule('Opp_Update_Schedule', CRON_EXP_DAY, new Opportunity_Update_Schedule(100));
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
ReplyDeletesoftware testing course in chennai
Hey Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post. Keep Blogging!
ReplyDeleteWeb Design Training