0

A year back I scheduled "Scheduled Apex" job via System.Schedule method (anon apex).

The job has been running once a day during this time.

Today I would like to check the end date (if any) of this scheduled job.

I could not find this information (end date of this job) from Salesforce UI.

Is there any way by which I can get this information ?

Basically we would need this job to run nonstop (once a day).

  • If you scheduled it via Apex, it doesn't have an end date unless you put one in your cron expression. – Adrian Larson Dec 18 '17 at 23:55
1

You want the EndTime field on the CronTrigger object. You could see the end date for all scheduled jobs with this query:

SELECT EndTime, CronJobDetailId, CronJobDetail.Name
FROM CronTrigger WHERE CronJobDetail.JobType = '7'

You could of course hard code or otherwise filter on CronJobDetailId to meet your specific needs.

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.