Jump to content


Nested while loops

  • Please log in to reply
No replies to this topic

#1 maeriyeth

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 May 2006 - 01:34 AM

Well. I'm trying to do some debugging with a set of daily scripts on my site that refuses to completely go through the things its supposed to do.

The script is mainly 2 while loops, 1 while loop inside the other. The first while loop is supposed to go through about 100-120 entries at max, while the while loop inside it also goes through about 100-120 entries at max.

What's happening is that I have it set on a cron timer and half or more of the designated jobs are left unfinished and I always end up having to manually trigger the script again to finish everything.

I am wondering if this is too much of a load on the loops, or would they normally be able to finish this in a certain amount of time?

Or, if that isn't the problem, I am also wondering whether the way I have it set up is the problem? Currently I have several scripts running from the same include file, which contains the function with the 2 while loops. Is having so many scripts running from a single function causing the script to stall and stop?

I'd like to rule out these two problems before I delve into the actual code to see if there is an actual code bug causing this issue.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users