Skip to main content
Format code
Source Link
Stephen Rauch
  • 4.3k
  • 15
  • 24
  • 33

ifIf you want a cron entry:

0 * * * * my_script

0 * * * * my_script 

then iI 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 () {

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

}

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 

}

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 } 
Source Link

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 

}