PHP Cron Script To Run Automated Jobs

by damonp on May 10, 2006

in PHP

I use this PHP script to automate running multiple jobs hourly, daily, weekly and monthly. Sure you can create simple scripts for each job and run them all separately via a Unix crontab, but this self-contained script allows running unlimited jobs all from one file. Plus, it provides a framework for building jobs and storing configurations after each run. It creates a cache file .crontab.php in the same directory, to store runtime and configuration data.

This version has been customized to run under ZenCart. Place in the ZenCart admin directory and make the modification to admin/includes/application_top.php as directed. To run automatically add to your system’s local crontab.

I am currently using to run order shipped updates and custom inventory re-order warnings on ZenCart sites. If you are interested in these specific jobs contact me for details.

Download crontab.php

Damon Parker is a freelance sysadmin and web developer in Texas. He specializes in server setup, server security and high performance server configurations. Need help setting up a web server or getting a server back online after a crash or hack? Email Damon

Raven Tools SEO Tools

{ 2 comments… read them below or add one }

Johnnie Rose, Jr. August 3, 2006 at 11:49 pm

To run a single PHP script or series of scripts when a web page is accessed, check into Jerrata Backbone. This software supports per-page and per-directory scheduling as well as tiered scheduling: scripts tied to a directory execute before scripts tied to a page within that directory.


Hadith February 12, 2010 at 12:03 pm

is there any other scripts that you have apart from zencarts, preferably just php. thanks


Leave a Comment

Previous post:

Next post: