You need to sign in to do that
Don't have an account?
Internal Partner
Batch job doesn't send email on a specific date scheduled for every year
Hi all,
I scheduled a batch job last year to run every 1. January at 12:05 am in every year. The batch job sends an email to a Support CRM team.
On the 1. January this year the job didn't run.
I checked the Apex code and everything is ok. Today I scheduled the batch at certain times by testing it and it worked, it sent an email to the Supoort CRM team. Now I am wondering if the following lines to invoke the batch job are correct:
I scheduled a batch job last year to run every 1. January at 12:05 am in every year. The batch job sends an email to a Support CRM team.
On the 1. January this year the job didn't run.
I checked the Apex code and everything is ok. Today I scheduled the batch at certain times by testing it and it worked, it sent an email to the Supoort CRM team. Now I am wondering if the following lines to invoke the batch job are correct:
MY_BATCH_JOB sendEmailJob = new MY_BATCH_JOB(); String sch = '00 05 00 1 1 ? *'; system.schedule('BATCH Yearly Email Reminder', sch, sendEmailJob);Is especially the line '00 05 00 1 1 ? *' correct or incorrect?
- Batch jobs /scheduler jobs run on the running user time zone so check the time zone correctly ..
- Some time job execution may be delayed. please check
Your cron expression looks good to meI submitted or scheduled the job in October 2018 in order for it to start on the 1st January every year. But once on the 1st January this year our customer reported that they didn't receive the email. No idea why.