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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
schedman:main [2017/08/27 10:27]
textstorm
schedman:main [2017/08/27 10:41] (current)
textstorm [Schedule Example]
Line 146: Line 146:
 if($caller) { if($caller) {
  
-    ///you can use $id to get the SchedRef of your script, useful for logging purposes +    ///you can use $this->​schedRef ​to get the SchedRef of your script, useful for logging purposes 
-    echo $id;+    echo $this->​schedRef;
  
     ///​$this->​date is the datetimestamp last known by SchedMan, you can update this using the method below. Useful for logging.     ///​$this->​date is the datetimestamp last known by SchedMan, you can update this using the method below. Useful for logging.
Line 156: Line 156:
  
     ///generate a log you can see in the database for your script     ///generate a log you can see in the database for your script
-    $this->​GenerateLog($id, "​Script Began Running at: $this->​date",​ -1);+    $this->​GenerateLog($this->​schedRef, "​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     ///you can reference $this->​db for your database connection if SchedMan is configured on the correct database for this script
Line 162: Line 162:
  
     ///need to set the job as failed if a try/catch goes wrong or validates incorrectly?​     ///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");+    $this->​setJobAsInError("​The job failed as we could not change x to 1")
 +     
 +    //tell SchedMan how many rows your job affected 
 +    $this->​rowsAffected = 1;
  
 } }
 </​file>​ </​file>​

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