• pvtbank jobs
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
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!
 
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.