Skip to main content
2 of 2
Format code
Stephen Rauch
  • 4.3k
  • 15
  • 24
  • 33

If you want a cron entry:

0 * * * * my_script 

then I recommend you think of a separate name for your cron management function, like, "cron_mgmt", whose first argument is a SWITCH in a CASE statement:

cron_mgmt () { case $1 in add ) ... ;; list ) ...;; remove ) ... help ) ... * ) echo "You need help. Here it is" cron_mgmt help ;; esac }