Activity Forums Salesforce® Discussions How can i schedule jobs in Salesforce Apex Flex Queue?

  • How can i schedule jobs in Salesforce Apex Flex Queue?

    Posted by Suraj on January 8, 2018 at 8:33 AM

    i recently got "You have exceeded the maximum number (100) of Apex scheduled jobs" error means Maximum 100 jobs can be scheduled in apex queue. Alternative is to use flex queue. How can i schedule jobs in flex queue rather than queue having limit of  maximum number 100?

    PRANAV replied 8 years ago 2 Members · 1 Reply
  • 1 Reply
  • PRANAV

    Member
    January 18, 2018 at 3:02 PM

    Hi Suraj,

    The Apex Flex Queue page lists all batch jobs that are in Holding status. You can view information about the job, such as the job ID, submission date, and Apex class. By default, jobs are numbered in the order submitted, starting with position 1, which corresponds to the job that was submitted first.

    When the system selects the next job from the Apex flex queue for processing, the job is moved from the flex queue to the batch job queue. You can monitor the moved job in the Apex Jobs page by clicking Apex Jobs.

    Alternatively, you can use System.FlexQueue Apex methods to reorder batch jobs in the flex queue. To test the flex queue, use the getFlexQueueOrder() and enqueueBatchJobs(numberOfJobs) methods in the System.Test class.

    Hope this helps you.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos