+ Start a Discussion

scheduled apex

I have a schedule apex job which I want to run during certain records creation, I'm trying to schedule it from apex controller method. 


Problem is it works fine for first time, for consecutive schedule, it says the job with given name exist.  It kind of wierd, i can't able to update next scheduled time of run for the same job, the sotp gap solutino is, i keep changing the name of the schedule job everytime, but it looks ugly since it creating a job with different name.  


1. How to update existing scheduled job next run time in apex ?


2.how to delete existing one and create new one from apex ?