Reputation: 17
Hello I want to schedule a task in Php. I have a Web Restful Api in which I want to schedule a Task at a specific time (only once not repetitive). How can I do it?
Can I do it with Crone Job, even though the tutorials I found show mostly for repetitive tasks.
Thanks
Upvotes: 0
Views: 102
Reputation: 46
There is no way of schedule a task just with PHP. IDEA: In your DB you can save time stamps, run what you want when the time stamps gets smaller than "time()" and then update the time stamp to the next run (after each time you run your code).
Upvotes: 1