Activity Forums Salesforce® Discussions What is a Cron Expression in salesforce? How it can help us in salesforce?

  • Satyakam

    Member
    January 23, 2017 at 6:03 am

    Hi Mohit,

    Apex classes to run at specific times, first implement the Schedulable interface for the class, then specify the schedule using either the Schedule Apex page in the Salesforce user interface, or the System.schedule method.

    Ex: CRON Expression to run half past the hour
    You can do it via code. The following code will schedule if for half an hour.

    ProcessAccs pa= new ProcessAccs();
    String cronStr = '0 30 * * * ?';
    System.schedule('Process Job', cronStr, pa);

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos