About
Community
Bad Ideas
Drugs
Ego
Erotica
Fringe
Society
Technology
register | bbs | search | rss | faq | about
meet up | add to del.icio.us | digg it
Go Back   Community > Technology > Everything *NIX
Register FAQ Members List Calendar Today's Posts

Everything *NIX This is a general forum about all forms of *nix. Post your ideas and thoughts on this wonderful OS family. Talk about your personal favorite flavor of *nix and why you think it's so much better than the others. Anything pertaining to *nix and *nix administration should be posted here.

Reply
 
Thread Tools Display Modes
  #1   Add miseryland to your ignore list  
Old 2008-04-10, 20:37
miseryland miseryland is offline
Regular
 
Default annoying cron job question

How would i set a time delay up for a cron job?
as stupid as that looks on first glance, if i had two programs start on reboot and i wanted the second to definatly start after the other was running, how do you go about this?

like is there some method of setting up a time delay for the second program?

OR maybe im just not getting it, and linux reads the crontabs file step by step and waits for the first program to be "fully up and running" before the next step in the crontab file?
Reply With Quote
  #2   Add Prometheum to your ignore list  
Old 2008-04-11, 20:12
Prometheum Prometheum is offline
Regular
 
01 Send a message via AIM to Prometheum Send a message via MSN to Prometheum
Default Re: annoying cron job question

Use a combination of uptime(1), sed(1), and at(1) to have the second script run however much after the first that you want.
Reply With Quote
  #3   Add Zok to your ignore list  
Old 2008-04-11, 21:11
Zok Zok is offline
Forum Administrator
 
Columbus Ohio
Default Re: annoying cron job question

Are the programs going to continue running or just run once each? Either way, execution by proxy with a shell script will work wonders. Write a shell script that waits N seconds before running program 2. By that time program 1 will have run. Either that, or have the shell script only run program 2 if it gets a proper return from 'ps' indicating that program 1 is running.
__________________
[zok@zoklet ~]$ whereis Zok
Zok: /derzok/at/gmail/dot/com http://bbs.zoklet.net/ http://itcrawledupmy.com/ http://therevoltpress.org
Reply With Quote
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
Forum Jump

 
To the best of our knowledge, the text on this page may be freely reproduced and distributed.
 

totse.com certificate signatures
 
 
About | Community | Bad Ideas | Drugs | Ego | Erotica | Fringe | Society | Technology
Hot Topics