phpJobScheduler - README |
My other applications:
|
|
![]() |
|
phpJobScheduler is designed to automate tasks by
scheduling PHP scripts to run at set intervals.
This version runs silently (no screen output) but saves the output, including any errors,
to the database.
Full details can be found at: www.phpjobscheduler.co.uk
Requirements:
To upgrade an existing installation:
Follow the details below - your existing scheduled tasks, if any exist,
will remain unchanged within your database.
Retain your existing /phpjobscheduler/pjsfiles/config.inc.php file - but you must add the new DEBUG constant.
Login to check your scheduled tasks are still waiting to be fired, by doing so it will automatically update your database and add the required new fields to the tables as required.
To complete a new installation:
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
<?php include( dirname(__FILE__) . "/phpjobscheduler/firepjs.php"); ?>
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.
If you have correctly completed the above the following tables will be created in your MySQL database:
phpJobScheduler
phpJobScheduler_log
Error log - recording of runs and errors of each fired task.
Recorded data: date of last run, and url including errors if any occur. If "Output:" has no data then this means the script ran without errors or output.
By default error logging is turned on (TRUE). To turn on/off error logs:
Change the value assigned to ERROR_LOG within the /pjsfiles/constants.inc.php file. Change the value to FALSE to stop logging. It will not affect the running of fired scripts if you turn off error logging.
The output is truncated to a maximum length of 1200 characters by default to ensure the logs table does not become too large. You can change this by editing the constant MAX_ERROR_LOG_LENGTH within the constants.inc.php file.
Altering the time frame window
This can be changed by altering the value assigned to TIME_WINDOW within the /pjsfiles/constants.inc.php file. The default value is 3600 seconds (60 minutes which should suffice for most sites). This means that when the firing engine (phpjobscheduler/firepjs.php) is called any scheduled job having a fire time within 60 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 the 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.