Jobs are discrete tasks that the Local Manager uses to collect information about the device it is managing. Jobs can include the collection of device info or the pull or push of a configuration or OS. Many jobs on the Local Manager are scheduled automatically during the initial config init process, but it is also possible to schedule additional jobs at any time.
To schedule a job, use the config schedule command:
config schedule <crontab> <job [job args]>
Command parameter definitions:
All times are MM/dd/yy-HH:mm:ss format
-d <delay> delay between 2 consecutive executions of the job in seconds
-D <day> day range (1 - 31)
-e <end time> end time after which the job is removed from the scheduler
-h <hour> hour range (0 - 23)
-m <minute> minute range (0 - 59)
-M <month> month range (1 - 12)
-o <one time> the one time at which the job should run
-s <start time> start time for the job
-W <week> week day (0 - 6)
Schedule Job Examples
Here are some examples of job schedules:
Command | Execution |
---|---|
config schedule -s 01/03/14-10:30:00 -e 02/03/14-10:29:59 -d 30 deviceInfo | Executes the deviceInfo job every 30 seconds between Jan 3 and Feb 3, 2014 |
config schedule -o 01/03/14-10:30:00 deviceInfo | Executes the deviceInfo job once on Jan 3, 2014 |
config schedule -M 3 -m 30 deviceInfo | Executes the deviceInfo job every half hour in March |
Issue the show schedule command at the managed device port to see the scheduled job.
[admin@LantronixLM (port1/1)]# show schedule
Listing currently scheduled jobs for device: port1/1 All times shown in UTC.
10: [Interval: 24:00:00 Mask: * * * * *] pullStartupConfig
12: [Interval: 336:00:00 Mask: * * * * *] pullOS
9: [Interval: 03:00:00 Mask: * * * * *] pullRunningConfig
11: [Interval: 24:00:00 Mask: * * * * *] pullVlanConfig
7: [Interval: 00:05:00 Mask: * * * * *] deviceInfo
Use the show schedule and config removejob {job ID} commands to find the scheduled job number and then remove that job from port. Note that the pullOS job number in the show schedule example above is job 3. To delete this scheduled job from the Local Manager port, issue the following command:
[admin@LantronixLM (port1/1)]# config removejob 3
Job 3 has been removed from the scheduler queue.
A monitor is a set of instructions to collect data at regular intervals. The Local Manager can collect certain data from any supported device. The available data depends on the device.
By default, monitors run every 30 seconds. When you create a monitor, you can specify how frequently the monitor runs. Many monitors may be scheduled automatically during the config init process. Monitors may include rules that specify how to evaluate the collected data. Rules give the monitor the ability to respond to changes or trends.
To schedule a monitor, use the config monitor command.
config monitor <monitor> <ruleList> <:[delay seconds]>
Command Parameters:
Schedule Monitor Examples
Here are some examples of simple monitor schedules:
Monitor | Execution |
---|---|
config monitor interface Ethernet0/0 interfaceBasic :30 | Schedules an interface monitor on Ethernet 0/0 applying the interfaceBasic ruleset with a delay of 30 seconds. |
config monitor ping 203.0.113.225 OOB-ping 30 | Schedules a monitor to ping 203.0.113.225 applying the OOB-ping rule with a delay of 30 seconds. |
config monitor chassis :30 | Schedules a chassis monitor with a delay of 30 seconds. |