0

I have three scripts running under crontab and theyre executing perfectly (see the log below):

Oct  9 10:40:01 servercharlie CRON[29850]: (root) CMD (php -q /var/www/folder/script-3.php)
Oct  9 10:41:01 servercharlie CRON[29861]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:42:01 servercharlie CRON[29867]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:43:01 servercharlie CRON[29873]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:44:01 servercharlie CRON[29879]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:45:01 servercharlie CRON[29887]: (root) CMD (   php -q /var/www/script-2.php)
Oct  9 10:45:01 servercharlie CRON[29888]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:45:01 servercharlie CRON[29889]: (root) CMD (php -q /var/www/folder/script-3.php)
Oct  9 10:46:01 servercharlie CRON[29901]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:47:01 servercharlie CRON[29907]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:48:01 servercharlie CRON[29915]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:49:01 servercharlie CRON[29921]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:50:01 servercharlie CRON[29929]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:50:01 servercharlie CRON[29930]: (root) CMD (php -q /var/www/folder/script-3.php)
Oct  9 10:50:01 servercharlie CRON[29931]: (root) CMD (   php -q /var/www/script-2.php)
Oct  9 10:51:01 servercharlie CRON[29942]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:52:01 servercharlie CRON[29949]: (root) CMD (php -q /var/www/tasks/script-1.php)
Oct  9 10:53:01 servercharlie CRON[29958]: (root) CMD (php -q /var/www/tasks/script-1.php)

Script 1 runs every minute and executes flawlessly. Script 2 executes every 5 minutes and this is the one I'm having problems with. It never completes its execution. It's a 10 - 15 minute long script. I have set_time_limit(0); in the file at the top, I have changed all limits on execution in php.ini to 0.

What else can be killing the execution of the script? At the moment it's working fine for half of the profiles on my website - but never reaches the last half...

Thanks in advance for any guidance!

2
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by pritaeas
0

There's nothing wrong with the script as it works great if I execute it in my browser. This has to be a setting that I don't know about somewhere

1

Well, if you run a script every 5 minutes, that takes 10-15 minutes to complete... every new script will slow down all others, incrementally.

Votes + Comments
haha! i get so wrapped in code I forget basic maths, of course!
0

Ofcourse but putting that aside - none of them are passing the 10 min marker... they should still complete their execution.

1

I think the only way to find out is to add some logging, so the script's actions become traceable.

0

That sounds like a good idea, any ideas how to log a scripts actions on Ubuntu 10.04 LTS?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.