You need to sign in to do that
Don't have an account?
Sagar Hinsu 13
how to restrict Schedule Apex job to schedule twice
I have a scenario where I am scheduling a job throw apex class.
I want to check whether this job is already scheduled or not? if it is not schedule then it should schedule and if it is scheduled then don't schedule it.
Datetime sysTime = System.now().addMinutes(5); String SchTimer = '' + sysTime.second() + ' ' + sysTime.minute() + ' ' + sysTime.hour() + ' ' + sysTime.day() + ' ' + sysTime.month() + ' ? ' + sysTime.year(); system.schedule('scheduleDataJob_'+ SchTimer , SchTimer, new DataScheduleJob(sr));
I want to check whether this job is already scheduled or not? if it is not schedule then it should schedule and if it is scheduled then don't schedule it.
Check the job with specific name, if you know the name of scheuled job
Hope it helps!