function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Varada Bhanage 5Varada Bhanage 5 

Scheduled job automatically stopped without any warning

Hello all,

We have written apex schedular job and which gets after every 1 minute.
However that job suddenly stopped working on 14th of January 2017.
We have rescheuled job again however we want to know why this happened?
Anyone has any idea about this?
If yes please help us in inderstanding.
Is there any way to notify administartor if job stops working?

Help is much approciated .
Thanks in advance.

Kind regards,
Varada
Best Answer chosen by Varada Bhanage 5
NagendraNagendra (Salesforce Developers) 
Hi Varada,

There is an idea on the success community for which you can upvote reagrding the same. Salesforce will not notify user once Schedule apex Job is Completed or stopped.If you want notification to be sent you need to do it manually by coding.

You can use messaging.sendemail() in finish method to notify once job is completed or stopped.

Regards,
Nagendra.

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Varada,

Schedule/Batch is not guaranteed to execute on the time you've given. They will be in Queue and gets executed when the system is free.

Another thing to potentially look into is concurrent batch limits: This will happen if the org's are running many batches in a small time frame!

Please mark this as solved if the information helps.

Best Regards,
Nagendra.
 
Varada Bhanage 5Varada Bhanage 5
Hello Nagendra,

Thanks for help.We understand that schedular may not get executed at time we have mentioned. but in our case it has stopped working.
We noticed it after 3 days that is on 17th january where we found that job has absolutley not executed after 14th  of january.

So our main concern is why this happened and can we get any notification whenn such thing happens?
 
NagendraNagendra (Salesforce Developers) 
Hi Varada,

There is an idea on the success community for which you can upvote reagrding the same. Salesforce will not notify user once Schedule apex Job is Completed or stopped.If you want notification to be sent you need to do it manually by coding.

You can use messaging.sendemail() in finish method to notify once job is completed or stopped.

Regards,
Nagendra.
This was selected as the best answer
Varada Bhanage 5Varada Bhanage 5
Hello Nagendra,

Thanks for help.
Marking this question as resolved.

Regards,
Varada
Aditya312Aditya312
Hey Varadha, I am facing same issue. I scheduled a batch in 5 mins interval but suddenly it stopped for no reason. Did you got any reason for you issue ?