1

we had a an old scheduled apex job running every 7 hours setup by a consultant. we deleted the job. we know the apex class that it used to call but we do not currently know the exact cron query or job details. is there anyways to look at the details just based on past apex job id.

2
1

There's no way to get the precise details. Even if you know the cron expression, you might not know all the parameters that were passed in to the class (which also becomes part of its state). You can try scheduling it using System.schedule, but you may encounter problems if additional data/parameters are required. Also, it appears that a query for deleted jobs will not return any values, so there doesn't appear to be an easy way to recover the details.

As far as scheduling it, you can try this Execute Anonymous script:

System.schedule('JobName','0 0 */7 * * ?', new ScheduledJobClassName());

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.