You need to sign in to do that
Don't have an account?
HNT_Neo
How to cancel an apex batch job
Hello,
Trying to cancel an apex batch job but no luck making it work.
This is the apex code I'm using and the error results are below. Any help is greatly appreciated!
Trying to cancel an apex batch job but no luck making it work.
This is the apex code I'm using and the error results are below. Any help is greatly appreciated!
string SCHEDULE_NAME = 'MergeMetricsCalculationBatchable'; System.abortJob(SCHEDULE_NAME);
Execute anonumous error Line: 2, Column: 1 System.StringException: Only CronTrigger IDs and batch, future, and queueable job IDs are supported.
Run the following query to find the scheduled or future Apex job id to delete:
.Pass the job Id here
Refer this link
https://help.salesforce.com/articleView?id=000003873&type=1
.
OR
Go to Setup>Monitor>Jobs>Scheduled Jobs --> Delete from here also
All Answers
Run the following query to find the scheduled or future Apex job id to delete:
.Pass the job Id here
Refer this link
https://help.salesforce.com/articleView?id=000003873&type=1
.
OR
Go to Setup>Monitor>Jobs>Scheduled Jobs --> Delete from here also
You can go with this code:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Assam Govt Jobs (https://www.assamsakori.org) Sakori in Guwahati (https://www.assamsakori.org) Online paise kaise kamaye (https://www.blogizon.com)