
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개
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