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
====== Schedule Development ====== This page will cover the requirements for developing SchedMan schedules and activating them. ===== Schedule Structure ===== Start with the below code structure: <file php ScheduleStructure.php> <?php if($caller) { //change this to your schedule reference (set-up in SchedMan GUI) $schedref = "AUC1"; //Put your schedule code here //This tells SchedMan the schedule has finished running //set $count to the number of rows you have updated ($queryresult->rowCount();) it will store how many rows were affected the last time the schedule ran $db->query("UPDATE scheduler SET rowsaff = '$count', running = '0' WHERE schedref = '$schedref'"); } ?> </file> ===== Adding a Schedule to SchedMan ===== Navigate to SchedMan and go to the "Create" page. You should see something similar to below. {{:untitled.png?200|}} To add the schedule fill the boxes in with the following values: **SchedRef:** The schedule reference you assigned to $schedref in the code **Description:** A description of what the schedule does **File:** Put the PHP file in the following location - http://www.yourgame.com/AdMiN/includes/schedules/ - put the name of the file in the box (example.php) **Time To Add:** Enter how often you would like the schedule to run in **Minutes**