LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 12: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, 01:29 AM   #2
b0uncer
LQ 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-27-2006, 11:56 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:42 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