phpJobScheduler

README

Now released under GPL License
That means its free to use!  Enjoy  ;-)

Author: http://www.DWalker.co.uk  For help and support please try the forum: http://www.dwalker.co.uk/forum/

Please consider making a donation, even a single Dollar (or a Pound) would be great!

Designed to automate tasks by scheduling PHP scripts to run at set intervals.

Requirements:

Full details can be at:
http://www.dwalker.co.uk/phpjobscheduler/


To complete a new installation:

  1. Unzip the files and upload to your server.

    The following assumes you have uploaded the files and folders retaining the original names
    i.e.  www.[your--Domain]/phpjobscheduler/pjsfiles/

  2. YOU MUST password protect the "pjsfiles" folder - if you fail to do so visitors to your site 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 (contact your host for details - and NOT ME!).
  3. Configure your installation - in your browser open the file:  pjsfiles/index.php  *
  4. Add the PHP code to fire your scheduled tasks when due.  There are two methods:
    1. add to the END of an existing PHP file, for example to your index.php home page (and/or any other relevant page in the root directory):

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

    2. add to the END of an existing HTML file, for example to your index.html home page (and/or any other relevant page):

    <img src="http://www.YOUR-domain/phpjobscheduler/firepjs.php?return_image=1" width="1" height="1">

    Adding the above img tag will add a very small clear image to your page - almost invisible.

  5. Finally add your scheduled tasks here: pjsfiles/index.php

To upgrade an existing installation:

  1. Remove all files from your original installation folder:  www.[your--Domain]/phpjobscheduler/
      RETAINING
    the following files:
       * config.inc.php  [your original config file, this can be used for the new version]
       * .htaccess   [should be there if you have password protected your folder!]
       * .htpasswd   [if there, depends on o/s]

  2. Unzip the files and upload to your server. 
    The following assumes you have uploaded the files and folders retaining the original names
    i.e.  www.[your--Domain]/phpjobscheduler/pjsfiles/

  3. The upgrade is complete (no changes required to database).  To use the new features please now follow steps 4 and 5 above.


*If the installation fails!

Possible Error:

On some systems a common error reported is:

Warning: fopen(config.inc.php): failed to open stream:
Permission denied in [home folder]/phpJobScheduler/install.php

To over-come this error

  1. unzip the file: config.inc.zip
  2. then using notepad or your favourite PHP editor open the file:   config.inc.php
    and change:
    1. YourUsername
    2. YourPassword
    3. YourdbName
  3. to your own details.  Then save the file in the folder: /phpJobScheduler/pjsfiles/
    Then, so long as the above install (section 3 above) has been run the application should load without error.


Altering the time frame window

This can be changed by altering the value assigned to TIME_WINDOW within the config.inc.php file.  The default value is 1800 seconds (30 minutes  which should suffice for most sites).  This means that when the firing engine (phpjobscheduler/phpjobscheduler.php) is called any scheduled job having a fire time within 30 minutes will be executed.

You can increase or decrease the default value of the time frame window.  If your site receives just a few hits per day you should consider increasing the value to 43200 (12 hours).

If your site ALWAYS receives several hits per hour or more then you should consider reducing the value to suit your needs.

NEED more help?  Try http://www.dwalker.co.uk/forum/


DISCLAIMER
phpJobScheduler IS PROVIDED "AS IS" WITHOUT REPRESENTATION OR WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY REPRESENTATIONS OR ENDORSEMENTS REGARDING THE USE OF, THE RESULTS OF, OR PERFORMANCE OF THE INFORMATION, ITS APPROPRIATENESS, ACCURACY, RELIABILITY, OR CORRECTNESS.
THE ENTIRE RISK AS TO THE USE OF phpJobScheduler IS ASSUMED BY THE USER.  IN NO EVENT I BE LIABLE FOR ANY DAMAGES, DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL, RESULTING FROM ANY DEFECT IN phpJobScheduler, EVEN IF THE POSSIBILITY OF SUCH DAMAGES HAS BEEN ADVISED.   THIS DISCLAIMER SHALL SUPERSEDE ANY VERBAL OR WRITTEN STATEMENT TO THE CONTRARY. IF YOU DO NOT ACCEPT THESE TERMS YOU MUST CEASE AND DESIST USING phpJobScheduler IMMEDIATELY.