Jump to content

Archived

This topic is now archived and is closed to further replies.

maeriyeth

Nested while loops

Recommended Posts

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.