phpJobScheduler - scheduling PHP scripts to run at set intervals your replacement for cron jobs. 

phpJobScheduler
is FREE to use its released under GPL License
About me
Contact me
My other applications
Support Forum 

Like it?
Please consider to DONATE

Every Bitcoin, penny or cent helps,
any amount is gratefully received

php
JobScheduler

Download here
(its "donate-ware" as someone rightly stated)

See the DEMO here

Technical details:
  Version:
  Date: 8th April 2014
  Size: 51 Kbytes
Host requirements: 
   MySQL & PHP
Operating System:
  Unix/Linux

Follow me and be informed when upgrades or important security patches are released:
Follow dwalkercouk on Twitter


Found a BUG? 
Report BUGS here

Like our script? Rate it at PHP > Hot Scripts





phpJobScheduler
Download here
. Scheduling PHP scripts to run at set intervals your replacement for cron jobs/crontab. A simple PHP cron script.

Designed to automate tasks by scheduling PHP scripts to run at set intervals, see the DEMO here
It is a replacement for cron jobs on Unix or scheduled tasks using Microsoft Scheduler - PHP hosting is required (if you host multiple sites try the reseller hosting).  phpJobScheduler is a scheduler that runs using  PHP and MySQL, other databases should now be compatible as all code now uses PHP/PDO for database connectivity (no root/admin access is required, so it will run on almost any web server).

You can now add variables (arguments) when adding or modifying jobs to be fired, eg. "fire_this_script.php?myvar=22&this_count=4"
For further details please read this post in the forum.
Note within your PHP scripts you access the passed values in this manner:
$_POST['myvar'];

Now using phpJobScheduler you can easily set times when a PHP script should run; automating tedious tasks such as running backups (use with phpMySQLAutoBackup for a complete MySQL automated backup solution), trimming a database table, or emailing a member when their membership fee is due.

Schedule a task to run every few minutes, hourly, daily or weekly - scheduled data is stored in a MySQL database via PHP. phpJobScheduler will fire any PHP script (or perl script) for you at the correct day/time (dependant upon your traffic to your web site).  Set one-off tasks to run at a set time, or schedule in a regular job to run each hour, every few days or weeks.

Limiting factor:  hits to site per minute/hour/day.  If you wish to add a scheduled job per hour your site must receive sufficient traffic within that time period.  Each time a page with the relevant PHP code is visited (this can be put onto multiple pages or different sites) the phpJobScheduler will check for any jobs waiting to be run at that time.  Therefore, so long as your site receives hits every single hour you can set a schedule to run hourly and you can be sure the task will be fired.

You can help ensure phpJobScheduler runs every hour by placing the following code on many pages on your site and/or OTHER SITES you have:

Ensure you change 'YOURDOMAIN' to your own domain name!

then its more likely for the script to be run each hour.

ALSO, note that any scheduled jobs due to be fired or if the fire time has past will be run when the script phpjobscheduler.php is run.   The method used is to fire any jobs if the fire time is now or has past.

e.g.  If you create an hourly scheduled job and add this at 5pm, but your web site doesn't receive a hit until 8pm then the script will be fired just once at 8pm and the next fire time will be set to 9pm (all on the same day).

Features:
- easy setup

- runs silently (no screen output)
- saves run logs to database
- saves error messages to database
- runs remote scripts in a secure folder
- schedule PHP scripts to run:
     1-59 minutes
     hourly
     daily
     weekly
 - add scheduled tasks
 - modify existing scheduled tasks
 - delete existing scheduled tasks
- and more...

See the DEMO here

 

Need help, or want to make a request?
Try the phpJobScheduler FORUM



Brief history

 

Please consider a DONATION via Bitcoin or Paypal

 

Don't want to install your own scheduling script?
Try SetCronJob for a simple hosted solution.

 

DEMO - Adding phpJobScheduler to your own PHP MySQL web site - DEMO

stages to get it working:

  1. Download and ftp to your own web site.

  2. Edit the file: /phpjobscheduler/pjsfiles/config.inc.php
    using notepad or your favourite PHP editor and change:

    define('DBHOST', 'localhost');// MySQL host address - localhost is usually fine
    define('DBNAME', '-');// MySQL database name - must already exist
    define('DBUSER', '-');// MySQL username - must already exist
    define('DBPASS', '-');// MySQL password for above username

  3. Upload the folders and files to your server.

  4. YOU MUST password protect the "pjsfiles" folder - if you fail to do so and someone found the folder on your website they could add/delete/modify your scheduled jobs!  If you host on Unix or Linux add htaccess to the folder to force a username and password prompt before entry (if you host on a Windows machine RTFM).  You can normally add security to a folder using your the Control Panel provided by your host (please contact your host for details - and NOT ME!).

  5. Then add the PHP or HTML code to fire your scheduled tasks when due.  There are two methods:
    1. add to the START (must the first script loaded before any output) of an existing PHP file, for example to your index.php home page (and/or any other relevant page in the root directory):

      <?php include( dirname(__FILE__) . "/phpjobscheduler/firepjs.php"); ?>

    2. or simply add to an existing HTML page, like your index.html home page and/or any other well visited page on any website:
    Ensure you change 'YOURDOMAIN' to your own domain name!
    The above HTML can be added to any web page on any website (not just to the site where phpJobScheduler is installed). Adding this code will add a very small clear image to your page - invisible (unless you know its there). Execution is very quick so will not slow the loading of any pages.

     

Then you can:

Add a schedule
    - add scheduled jobs quickly and with ease

Manage scheduled jobs
    - modify or delete scheduled jobs, view each jobs properties

View error logs
    - check the output from your scheduled tasks, including any errors if they occur. Also, check when a script last fired.

phpJobScheduler is FREE

Need help, or want to make a request try our
phpJobScheduler FORUM

Copyright DWalker.co.uk | Advertise on this site
Privacy Policy | phpAMA - PHP MySQL members area | del.icio.us links | Digg these!