Table of Contents

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. 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).

For the script we're using, the Arena language and the API Manual.

Trigger

Events:

It is triggered whenever the event occurs.

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.

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. 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. 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 underConfiguration Parameters