The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cron job starts new cron proccess ron76 SUN Solaris 3 05-12-2008 01:07 AM
Cron and Pseudo-Cron dingusmcghee UNIX for Dummies Questions & Answers 1 01-31-2008 11:58 AM
CRON usage for CRON job skyineyes UNIX for Dummies Questions & Answers 1 01-17-2008 09:17 AM
AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log Keith Johnson AIX 0 01-09-2008 07:32 PM
Cron : you are not authorized to use cron. Sorry. tt155 UNIX for Advanced & Expert Users 1 07-06-2005 10:37 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-05-2009
Registered User
 

Join Date: Jan 2009
Posts: 4
Single Cron

Hi there everyone. So my host doesn't allow crons more then every 15 minutes I need to do every 10 minutes.

So i was thinking of using sleep. Would this count as a single cron?:
Code:
php -qf /home/blah.php; sleep 600; php -qf /home/blah.php;
Do you think I can get away with that?

My other idea was to make blah.php handle it:
Increase the timeout limit to 10 minutes. Then run it once sleep 10 minutes then call the function again then end.


Which way do you think would be lowest concern to host?
Sponsored Links
  #2 (permalink)  
Old 01-06-2009
cfajohnson's Avatar
Shell programmer, author
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 1,974
Quote:
Originally Posted by pg300 View Post
Hi there everyone. So my host doesn't allow crons more then every 15 minutes I need to do every 10 minutes.

So i was thinking of using sleep. Would this count as a single cron?:
Code:
php -qf /home/blah.php; sleep 600; php -qf /home/blah.php;
Do you think I can get away with that?

Try it and see.
Quote:
Which way do you think would be lowest concern to host?

Ask your host's system administrator.
  #3 (permalink)  
Old 01-06-2009
Registered User
 

Join Date: Jan 2009
Posts: 4
Its hostgator does anyone have any experience with them and this issue?

That's a good idea ill also try do that but they take forever to respond. So if anyone knows please still post
  #4 (permalink)  
Old 01-06-2009
Registered User
 

Join Date: Jan 2008
Posts: 24
Do they allow you to have 2 chron jobs? You could run the same process twice or make a copy with a new name and run one at 0, 20, 40 minutes ant the other at 10, 30, 50 minutes.
  #5 (permalink)  
Old 01-16-2009
Registered User
 

Join Date: Jan 2009
Posts: 4
They're only letting one run every 15 minutes Its host gator
  #6 (permalink)  
Old 01-16-2009
Registered User
 

Join Date: Dec 2008
Posts: 97
A cron can only run once every 15 minutes. So you can have multiple crons, each individual one can not run more often then once every 15minutes. I would also suggest staggering the times that they run.

*/15 * * * *
*/15+2 * * * *
*/15+4 * * * *

At least I think that works >_<
  #7 (permalink)  
Old 01-27-2009
Registered User
 

Join Date: Jan 2009
Posts: 4
Hey that's a good idea. Thanks man ill try that. I used to do ******* but got contacted by host saying dont do every minute. I just want to do something that they dont care about. What do you think of my one cron just put in sleep 60 between each php call?
Google The UNIX and Linux Forums
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 04:46 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66