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
David Holland 6David Holland 6 

Batch job issues

Hi all

We have 4 batch jobs within our org and 3 of them seem to have issues in our production environment.

They are scheduled to run at different times of the day (late at night/early morning to reduce overhead), but all have issues.

1 of them doesn't even show up in the "Scheduled job" list, one says "Aborted by user" (cannot be done as this is an automated user that no obe logs in to, and the third gives a Java compile error).

These jobs all run successfully in full sandbox and if I run them anonymously through Apex.

Please let me know any ideas!
Best Answer chosen by David Holland 6
David Holland 6David Holland 6
So I discovered the issue was due to having too much data being queried.

After removing this, the batch jobs worked!

All Answers

Arunkumar RArunkumar R
Hi David, 

The schedule is evaluated based on the timezone of the user who created the process. I request you try to delete your jobs in production and reschedule it.

Go through the below considerations before schedule it,

https://help.salesforce.com/apex/HTViewHelpDoc?id=process_limits_scheduled.htm&language=en_US
Ajay K DubediAjay K Dubedi
Hey David,
Your issue is somehow weird but I think in your case the limits of batch jobs exceeding in production 
So have a look on these key points : 
1.Maximum number of Batch Apex jobs in the Apex flex queue that are in Holding status : 100
2.Maximum number of Batch Apex jobs queued or active concurrently : 5
3.Maximum number of Batch Apex job start method concurrent executions : 1
5.Maximum number of batch jobs that can be submitted in a running test : 5

Regarding the "Job closed" :
- Only the user who created a job can close it. Any user with correct permission can abort a job.
Regarding the "Job abort"
-Any user with correct permission can abort a job. Only the user who created a job can close it.
David Holland 6David Holland 6
So I discovered the issue was due to having too much data being queried.

After removing this, the batch jobs worked!
This was selected as the best answer