@isTest
public class ContractAmendmentLinkageTestClass{
@isTest static void Amendment(){
ContractAmendmentLinkage Contractobj = new ContractAmendmentLinkage ();
String sch = '20 30 8 10 2 ?';
String jobID = system.schedule('ContractAmendmentLinkage JOB', sch, Contractobj);
Datetime sysTime = System.now().addSeconds( 300 );
String chronExpression = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();
System.Schedule('SelfSchedule ' + sysTime, chronExpression, new ContractAmendmentLinkage() );
}
}
public class ContractAmendmentLinkageTestClass{
@isTest static void Amendment(){
ContractAmendmentLinkage Contractobj = new ContractAmendmentLinkage ();
String sch = '20 30 8 10 2 ?';
String jobID = system.schedule('ContractAmendmentLinkage JOB', sch, Contractobj);
Datetime sysTime = System.now().addSeconds( 300 );
String chronExpression = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();
System.Schedule('SelfSchedule ' + sysTime, chronExpression, new ContractAmendmentLinkage() );
}
}
sch: Is
the corn expression ,the corn expression is nothing but the next scheduled
time.
ContractAmendmentLinkage JOB: is the name of the job.
Contractobj:: is the object of the scheduled class which we need to run.
corn expression for to run schedule(ContractAmendmentLinkage) every 5min. below
ContractAmendmentLinkage JOB: is the name of the job.
Contractobj:: is the object of the scheduled class which we need to run.
corn expression for to run schedule(ContractAmendmentLinkage) every 5min. below
// This is
Self-Schedule To Execution purpose.
(Datetime
sysTime = System.now().addSeconds( 300 );
String chronExpression = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();
System. Schedule( 'SelfSchedule ' + sysTime, chronExpression, new ContractAmendmentLinkage() );)
String chronExpression = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year();
System. Schedule( 'SelfSchedule ' + sysTime, chronExpression, new ContractAmendmentLinkage() );)
No comments:
Post a Comment