Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-21-2010, 07:59 AM   #1
Registered: Dec 2009
Posts: 33

Rep: Reputation: 1
running scripts with cron

i have a script in /root/ .how can i run this script with cron??
crontab -e
* * * * * "how to give path to script?"
Old 07-21-2010, 08:14 AM   #2
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 111Reputation: 111
Hi suj,

Try following entry

crontab -e

30 * * * * /bin/bash /root/ script execute every 30 min.
Old 07-21-2010, 04:56 PM   #3
LQ Newbie
Registered: Mar 2010
Location: Thessaloniki, Greece
Distribution: Debian, Ubuntu, CentOS, Fedora
Posts: 11

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

chmod 700 /root/
crontab -e
30 * * * * /root/
to execute it every 30 mins.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running shell scripts with cron Lossenelin Linux - General 2 09-24-2009 02:51 PM
Running Scripts at Boot, via Cron etc maxhugen Linux - Newbie 2 12-06-2005 09:42 PM
What are you're best Cron scripts? deception Programming 7 11-11-2005 06:37 PM
cron scripts kirmet Programming 1 10-20-2005 12:37 PM
expect scripts and cron banderson Linux - Software 8 05-27-2005 04:44 AM

All times are GMT -5. The time now is 04:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration