I want one of my PHP file to be executed when the cron job is executed. I want to do this for updating the database of every users. It is a Banking application project and I need to update every user's account with interest amount. Any other possible approach/suggestion welcomed.
migrated from stackoverflow.com Mar 13 '13 at 5:41
This question came from our site for professional and enthusiast programmers.
Since there is no standard "A cron job has been created" hook, this would be somewhat non-trivial.
I suppose you could hack cron and run your own custom build of it that would keep a history of the jobs it had seen and run the PHP script if it saw a new one.
Alternatively you could watch for changes to the various files/directories that cron jobs are stored in (e.g.