set shell script on cron tab

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vaskarbasak
    New Member
    • Feb 2008
    • 27

    set shell script on cron tab

    Hi All,

    how will i set shell script on cron tab to execute the script?

    please help me.

    Thanks!
    Vaskar
  • ashitpro
    Recognized Expert Contributor
    • Aug 2007
    • 542

    #2
    Originally posted by vaskarbasak
    Hi All,

    how will i set shell script on cron tab to execute the script?

    please help me.

    Thanks!
    Vaskar
    save your shell script somewhere e.g. /home/user/test.sh
    use 'crontab -e' command to open the configuration file.
    schedule your job as follows:
    hour min day month year command

    Suppose you want to execute shell script every day at 18:30:

    18 30 * * * /bin/sh /home/user/test.sh

    save the file.
    restart the cron service:
    /etc/init.d/cron restart

    Thats it

    Comment

    Working...