Tag Archives: cron
PHP manage multiple cronjobs with a single crontab entry
In many php applications there are multiple tasks that need to be run via cron at different times. In a typical application you may be doing the following tasks via cronjobs : 1. Backup database. 2. Send out email to subscribers. 3. Clear temporary files. 4. Fetch xml feeds from some source and store them… Read More »
PHP check if a timestamp matches a given cron schedule
desktop:~$ php -a Interactive shell php > echo time(); 1319362432 php > Above is an example of a given timestamp. And a cron schedule can look like this 0 5 * * * – which means run everyday at 5 hours and 0 minutes. Now in a php application you may need to test if… Read More »