how to create php scheduled process? -
I was asked to create a web application that will send updates to the user for some time.
For example, the user is requesting updates every 5 minutes from 1 June to August
I do not know how to automate the background process ... should I add it to the cron? Can Cron work on windows server (Apache on windows)?
On a Windows server you can write tasks scheduled. In a set task you can set it to run the update for the desired frequency.
From:
With scheduled work, you can run any script, program, or document at one time that is most convenient for you.
A more programmatic approach will be to protect your users' settings and last update time. After that you can take a script that checks and updates as needed.
You can do a scheduled task to run that script every minute, which will update based on your users' settings.
Comments
Post a Comment