LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   running scripts with cron (https://www.linuxquestions.org/questions/linux-newbie-8/running-scripts-with-cron-821248/)

suj 07-21-2010 07:59 AM

running scripts with cron
 
i have a script in /root/new.sh .how can i run this script with cron??
crontab -e
* * * * * "how to give path to script?"

sem007 07-21-2010 08:14 AM

Hi suj,

Try following entry

Code:

crontab -e

30 * * * * /bin/bash /root/new.sh

new.sh script execute every 30 min.

Filip_Kv 07-21-2010 04:56 PM

Make sure that the script in /root has executable permissions before scheduling it.
As root type:

Code:

chmod 700 /root/new.sh
crontab -e
30 * * * * /root/new.sh

to execute it every 30 mins.


All times are GMT -5. The time now is 02:43 PM.