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 02:07 AM
Cron and Pseudo-Cron dingusmcghee UNIX for Dummies Questions & Answers 1 01-31-2008 12:58 PM
CRON usage for CRON job skyineyes UNIX for Dummies Questions & Answers 1 01-17-2008 10:17 AM
AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log Keith Johnson AIX 0 01-09-2008 08:32 PM
Cron : you are not authorized to use cron. Sorry. tt155 UNIX for Advanced & Expert Users 1 07-06-2005 11:37 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-05-2009
pg300 pg300 is offline
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?
  #2 (permalink)  
Old 01-06-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,362
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
pg300 pg300 is offline
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
prismtx prismtx is offline
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
pg300 pg300 is offline
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
Rhije Rhije is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 103
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
pg300 pg300 is offline
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?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:03 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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