Differences

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

Link to this comparison view

Next revision
Previous revision
configuration:sdk-job [2020/06/24 10:58]
dodenhoeft created
configuration:sdk-job [2022/07/21 07:37] (current)
dodenhoeft [Regex]
Line 1: Line 1:
 ====== SDK Job Management ====== ====== SDK Job Management ======
 +==== General ====
 +The SDK Job Management consists of a script, a trigger and a job.\\ The script performs a specific function such as sending an SMS, mounting a USB stick or listening to a serial interface.
  
 +The trigger triggers the script. The trigger can be based on an event or on a time. Events can be based on all sorts of features of the router. \\ Example: incoming call, successful/​failed SMS, interfaces are powered up/off, VPN functions are enabled/​disabled and many more. A script can also be triggered manually via the CLI.
 +
 +When the job is created, a trigger can be assigned to a script.
 +
 +
 +==== Script ==== 
 +To do this, navigate to Services -> Job Management -> Scripts -> Add on the web interface.
 +{{ :​configuration:​jobmanegement_scripts.png?​nolink |}}
 +Here a name(regex),​ a description and the arguments of the script can be passed. Furthermore,​ the script is created here by writing(edit),​ uploading(uploading) or selecting it from memory(select).
 +{{ :​configuration:​jobmanagement_scripts_edit.png?​nolink |}}
 +
 +For the script we're using, [[https://​wiki.netmodule.com/​sdk/​reference|the Arena language and the API Manual]].
 +
 +==== Trigger ==== 
 +==Events:==
 +It is triggered whenever the event occurs.
 +
 +{{ :​configuration:​jobmanagement_trigger.png?​nolink |}}
 +
 +Here sdk-startup was chosen as the trigger. This means that the script is triggered every time sdk starts, including when booting up. If system-startup is selected, only the system-startup of the router is triggered. If you select cliphp as the trigger, you can trigger the trigger manually via a browser. The command is: nmevent -e "​cliphp"​ -m "​TRIG"​. "​cliphp"​ is the event and "​TRIG"​ is the name of the trigger.
 +==Date&​time:​==
 +If you use a time-based trigger, the following menu is displayed.
 +{{ :​configuration:​jobmanagement_trigger_time.png?​nolink |}}
 +
 +Here the trigger can be given a name (regex) again. In the condition field, you can set the time interval in which triggering is to be done. In the timespec field, this time is then specified. In the image above, periodically selected as the time trigger. The trigger is now triggered every 1.5 hours.
 +==== Job ==== 
 +The arguments for the script are passed.
 +{{ :​configuration:​jobmanagement_job.png?​nolink |}}
 +Here, the selected script is mapped with the selected trigger.
 +
 +====Administration====
 +Under SDK -> Administration -> status you can see whether the SDK environment is active, a job is currently running and whether a job has been terminated.
 +{{ :​configuration:​sdk_administration1.png?​nolink |}}
 +The exit codes are used to return the status of the success of a job. Exit code 0 means no errors.
 +====Regex====
 +The allowed symbols for name, arguments and other can be found under[[documentation:​config-parameters|Configuration Parameters]]