LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-26-2003, 04:00 PM   #1
Gorbachov
LQ Newbie
 
Registered: Sep 2003
Location: Bankya
Distribution: ASPLinux v7.3 Vostok
Posts: 29

Rep: Reputation: 15
Crontab


Hi,

I have one script in acctualy in /root I want to put it into my cron to check it every 5 or 10 minutes...and I am interested if the script is not started...so it will be started or not?!
What I have to write in it...?


Gorbachov
 
Old 09-26-2003, 04:06 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You will need an entry like:
0-59/10 * * * * /root/myscript.sh 2>&1 > /root/myscript.log

This will run it every ten minutes and write a log of any output.

Last edited by david_ross; 09-26-2003 at 04:08 PM.
 
Old 09-26-2003, 04:10 PM   #3
Faecal
Member
 
Registered: Sep 2002
Location: York, UK
Distribution: Debian Sid
Posts: 215

Rep: Reputation: 30
Something like
Code:
0-59/5 * * * * root /root/somescript
In /etc/crontab (you could alternatively do a "crontab -e" while logged in as root, and enter it there).
That executes all hours of the day, every 5 minutes.

See man 5 crontab for more info.
 
Old 09-26-2003, 04:40 PM   #4
Gorbachov
LQ Newbie
 
Registered: Sep 2003
Location: Bankya
Distribution: ASPLinux v7.3 Vostok
Posts: 29

Original Poster
Rep: Reputation: 15
10x...
 
  


Reply



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
crontab x2??? killahsmurf Slackware 2 05-24-2005 10:53 PM
Crontab wormraper Debian 4 05-15-2005 01:01 AM
How to use crontab ? Dakkar Linux - Newbie 2 01-22-2004 10:49 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
HELP!! crontab karleong Linux - General 9 07-12-2003 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:50 PM.

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