Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/sfoyston/public_html/TextStorm/Wiki/inc/init.php on line 560

Warning: Cannot modify header information - headers already sent by (output started at /home/sfoyston/public_html/TextStorm/Wiki/inc/init.php:560) in /home/sfoyston/public_html/TextStorm/Wiki/inc/auth.php on line 495

Warning: Cannot modify header information - headers already sent by (output started at /home/sfoyston/public_html/TextStorm/Wiki/inc/init.php:560) in /home/sfoyston/public_html/TextStorm/Wiki/inc/actions.php on line 210
schedman:main - TextStorm Wiki

The Wiki is still in development, please bare with us while we add and update content.

This is an old revision of the document!



Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/sfoyston/public_html/TextStorm/Wiki/inc/parser/handler.php on line 1458

Warning: preg_match(): Compilation failed: invalid range in character class at offset 3093 in /home/sfoyston/public_html/TextStorm/Wiki/inc/parser/lexer.php on line 118
A PCRE internal error occured. This might be caused by a faulty plugin

====== SchedMan Overview ====== SchedMan is a scheduling application developed in PHP to handle automation and scheduled tasks, without requiring a Cron Job for every task you want to perform. It requires one Cron Job to run which is pointed at the main handler. SchedMan is useful if you need to deploy a number of repeatable ad-hoc tasks rapidly, or your hosting provider limits the number of Cron Jobs you can run. ===== Version Control ===== SchedMan is currently at V1.0 - Launch Version, this release contains all of the features found in the [[schedman:main#features|Features Section]] - The installer can be downloaded by [[http://sfoyston.com/SchedManV1/download.php|clicking here]]. ===== Features ===== Please find below an overview of SchedMan's features - see our walkthrough guides for more detail on these: * Simple Installer to get you running quickly * Set up "Jobs" to run scripts at intervals defined by you * Basic Scheduler - Run your job at a defined interval repeatedly * Advanced Scheduler - Define specific time frames and days the job should run, such as Friday between 02:00 and 03:00 * Manage your Jobs through an intuitive GUI * Logging to show how long your schedules are taking to run - your scripts can utilize our logging method for further feedback * Error Handling - see if your jobs have failed on the interface, you can use our method to mark your Job as failed * Optional Alerting if you would like to receive an e-mail if a job fails * Optional password protection for your interface ===== Installation and First Look ===== Once you have [[http://sfoyston.com/SchedManV1/download.php|Downloaded SchedMan]], upload the files to your website hosting platform. Then navigate the folder structure you set up - for example: http://www.yourdomain.com/SchedManV1/ You will then see the installation page as below: {{:schedman:install1.png?200|}} Continue to fill in all of the fields, they are all mandatory, your screen should look similar to the below: {{:schedman:installentries.png?100|}} When you press the button to install, SchedMan will check you've entered the values for each field, and that your database connection details work correctly. If not you will receive one of the two errors below: - Database details incorrect - could not connect - A field was left empty When you have entered all of the details, and SchedMan can connect to the database you will see the screen below: {{:schedman:install2.png?200|}} **Please ensure you set up the Cron Job, there is help displayed on the screen as to where to point it to, and set it up to run every 1 minute.** Once you have setup the Cron Job, click the Go To SchedMan link, where you will see an empty table. {{:schedman:install3.png?200|}} You should then go to the **Create** screen to add your first schedule. * **SchedRef** - The ID tied to your schedule, for example - UUA1 * **Description** - What does this job do? Describe it for reference * **File** - The file name of the script to run, for example - updateuserattribute.php * **Time To Add** - When the script is run, how many minutes before it should run again? {{:schedman:create.png?200|}} Once you have added the job, you will be taken to the **Modify** screen. {{:schedman:created.png?200|}} Your job will now run, the next time the Cron Job you set-up earlier runs schedman.php ===== Schedule Example ===== <file php ScheduleExample.php> <?php //$caller is set to 1 by SchedMan, use this if your scripts should only execute when SchedMan runs them. if($caller) { ///you can use $id to get the SchedRef of your script, useful for logging purposes echo $id; ///$this->date is the datetimestamp last known by SchedMan, you can update this using the method below. Useful for logging. echo $this->date; ///Call this method if you are using $this->date for a DateTime and would like it to be updated - useful for logging purposes $this->UpdateDateTime(); ///generate a log you can see in the database for your script $this->GenerateLog($id, "Script Began Running at: $this->date", -1); ///you can reference $this->db for your database connection if SchedMan is configured on the correct database for this script $this->db->query("SELECT * FROM schedlogs"); ///need to set the job as failed if a try/catch goes wrong or validates incorrectly? $this->setJobAsInError($id, "The job failed as we could not change x to 1"); } </file>


QR Code
QR Code schedman:main (generated for current page)