User customization guide, Introduction, Periodical program execution – SENA SS800 User Manual
Page 103

103
9. User Customization Guide
9.1. Introduction
The Super Series supports various ways of customization so that user can fit Super Series for his own
purpose. The Super Series provides following types of user customization methods,
-
Periodical program execution
-
User defined web pages
-
Making and running user’s own code.
9.2. Periodical Program Execution
User can use crontab to execute a specific program periodically. To enable periodical jobs using
crontab
, please complete following steps,
Step 1 Create a crontab file on /usr2 directory. Following sample crontab file generates
current_date
file under /tmp directory and revise its contents every 2 minutes.
SHELL=/bin/bash
# Sample crontab job
# Run every two minutes
* * * * * echo `date` > /tmp/current_date
Step 2 Register crontab file using following command.
root@SS800_Device:/usr2# crontab samplecrontab_file
Step 3 To make cron job permanent for every system reboot, please use rc.user script as
follows:
#!/bin/bash
#
# rc.user : Sample script file for running user programs at boot time
#
#PATH=/bin:/usr/bin:/sbin:/usr/sbin
# Add shell command to execute from here
crontab /usr/samplecrontab_file
exit 0
Please note that –e option (editing current crontab using editor) is not supported in SS. So user
must user vi editor to change contents in crontab file.
For more information about the format of crontab file, please refer to Linux crontab manual(man 5
crontab
).