+ Start a Discussion

Set Start and End Date of Cron Trigger using Apex Code

I have created one VF page which allows users to create schedule on Daily, Weekly and Monthly basis, which is working perfectly fine, now I am trying to add option of Start Date and End Date for all schedule i.e. I want to give ability to user that he/she can start schedule on specific day and can end on specific day for e.g. the Schedule is Daily, Start Date is 01/Jan/2015 and End Date is 05/Feb/2015 then the schedule must be executed for 36 times (01 Jan to 05 Feb) and after 05th Feb the schedule must be terminated
If anyone knows how to do this using Apex please help me
Iqrar AhmedIqrar Ahmed
Hi Nirav,

Use apex scheduler to acheive this here is documentation