Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global class autoCreateIS implements Schedulable {
- global void execute(SchedulableContext arc) {
- autoCreateIS schedule =new autoCreateIS();
- String sch = '0 0 0 1 1 ?';
- System.schedule('autoCreateISsched',sch, schedule);
- Date dateToday = system.Today();
- Integer year = dateToday.year();
- Integer nextYear = (year + 1);
- IS__c createIS = new IS__c();
- createIS.Name = String.valueOf(nextYear);
- insert createIS;
- }
- }
Add Comment
Please, Sign In to add comment