I'm developing changes and routines in a web application created in PHP and CakePHP, in case one of the routines would be a Component run every 15 days, to update an .html file As in PHP, do I check if X has been past days of the last execution of a given routine?
I thought of the following algorithm, but it is the 'smart' way to do the verification, how to code the algorithm?
1- Take the recorded milliseconds into a text file. 2- get the current milliseconds. 3- If you have nothing in the text file, or the current milliseconds are greater than or equal to, the milliseconds recorded in the file plus the value of X days in milliseconds. 4- record the current milliseconds in the text file.