Jump to content

Nested while loops


maeriyeth

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.