Skip to main content
sts oscar が「#Data Management」で質問
Hi All

 

i would like to run my schedule class for every 30 seconds ?

 

please can any one give me the syntax for this

 

Thanks in advance
2 件の回答
  1. 2013年9月5日 6:58
    Hey STS,

     

    Here's an example with code syntax:

     

    http://salesforce.stackexchange.com/questions/12874/chaining-scheduled-apex-to-process-callouts-every-30-seconds

     

    private void reSubmitJob( )

     

    {

     

           // try again in a minute

     

           Datetime sysTime = System.now().addSeconds( 60 );

     

           String chronExpression = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();

     

           System.schedule( 'Scheduled Apex ' + sysTime, chronExpression, this );

     

    }

     

    Hope this helps!

     

    David
0/9000