LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices



Reply
 
Search this Thread
Old 06-23-2006, 01:55 AM   #1
houssamfarag
LQ Newbie
 
Registered: Dec 2005
Posts: 10

Rep: Reputation: 0
crontab issue


how can i run crontab job every less than a minute
i used */1 to run it every minute

how to run the job every 30 seconds for example


thanks a lot
 
Old 06-23-2006, 02:29 AM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
One way, maybe robust, would be to create a script that's run once a minute, and the script itself would start the desired job, then sleep 30 seconds and re-run the job again. This way the script itself runs once every 30 seconds, and the script is run once a minute, so all in all you get the job running at 30 second intervals.
 
Old 06-28-2006, 12:56 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
I hope this is a very short run job, or it'll trip over itself.
You'd prob be better off turning it into a daemon.
Don't forget there is a perf overhead of creating a new process env everytime you start it.
 
  


Reply


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
crontab Red Hat Enterprise 4 issue jaxalope Linux - General 4 04-05-2006 10:43 AM
Newby w/crontab or emacs issue vrogers64 Mandriva 3 01-20-2005 05:11 AM
crontab issue lappen Linux - Newbie 6 05-24-2004 06:47 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM
Crontab Help w0rmh0l3 Linux - General 11 12-11-2001 06:06 PM


All times are GMT -5. The time now is 10:44 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration