crontab
min (0-59) hour (0-23) day-of-month (1-31) month (1-12) day-of-week (0-6, Sunday=0) command
List scheduled jobs
crontab -l
Edit scheduled jobs
See vi for editing crontab. See Crontab Generator for examples.
crontab -e
Examples
“&>” will redirect all script output to the log file. To append, use “&>>”.
# Every hour at 00 minute
00 * * * * /home/someuser/test.sh &> /home/someuser/logs/test.log
watch
Run a command at regular intervals (defaults to 2 seconds)
watch <command>
watch ps -fC nmap
[Ctrl+C]
Run a command every n seconds
watch -n 10 <command>
[Ctrl+C]