Some of my code has a long process, and my ISP limits the scripts to 30
seconds.
Now, I must absolutely create a file with some string (simply a number and
an email), then process any line with some long operations.
If the script timeouts, then calling the script again should start when it
finished.
How to achieve that ?
I tough about deleting the last line every time it's processed and then the
process is done when the file is empty.
There is also the possibility to create a tracker file where I save the last
processed number, but it's longer to do.
Any tip ? 3 2742
Bob Bedford wrote: Some of my code has a long process, and my ISP limits the scripts to 30 seconds.
Now, I must absolutely create a file with some string (simply a number and an email), then process any line with some long operations. If the script timeouts, then calling the script again should start when it finished.
<snip>
Did you try to overrule that setting with ini_set?
You can use it at the start of your script and set another value for the
script timeout.
(read here) http://nl2.php.net/manual/en/function.ini-set.php
Try that first, if just might work.
Regards,
Erwin Moller
Bob Bedford wrote: Some of my code has a long process, and my ISP limits the scripts to 30 seconds.
Now, I must absolutely create a file with some string (simply a number and an email), then process any line with some long operations. If the script timeouts, then calling the script again should start when it finished.
How to achieve that ?
I tough about deleting the last line every time it's processed and then the process is done when the file is empty. There is also the possibility to create a tracker file where I save the last processed number, but it's longer to do.
Any tip ?
Erwin Moller wrote: Bob Bedford wrote:
Some of my code has a long process, and my ISP limits the scripts to 30 seconds.
Now, I must absolutely create a file with some string (simply a number and an email), then process any line with some long operations. If the script timeouts, then calling the script again should start when it finished.
<snip>
Did you try to overrule that setting with ini_set? You can use it at the start of your script and set another value for the script timeout.
(read here) http://nl2.php.net/manual/en/function.ini-set.php
or, if you are allowed to use .htaccess files, put one in the folder
that your long running script is in. Try this, it works great for me:
# php_value name value
php_value post_max_size 666M
php_value upload_max_file size 10M
php_value max_execution_t ime 16666 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Doug |
last post by:
I have a script that does a huge database update, which takes a long
time. However, the host I am running on (and I suspect most hosts) are
running in "safe mode." This means I cannot change the maximum execution
time of scripts. So, the script stops right in the middle of doing the
update.
On top of that, I am trying to make code that I can distribute to
others. As of now, the only way that this script can be run is with sys
admin...
|
by: Rajani |
last post by:
Hello,
First of all sorry for the long code. But i want to explain clearly what i
am doing.
For i = 0 To UBound(arrResSizes) - 1
For j = 0 To UBound(arrqty) - 1
For k = 1 To totopr Step 8
tempjob = right(jc,5)
tempsize = left(arrResSizes(i) & " ", 3)
|
by: Siang Hwee |
last post by:
Hi. I am facing some problem in Asp.net. I am developing a payroll
application currently. This is a web-based application. User need to click on
"Process" button in order to process the payroll every time. Now the problem
is, if the processing time is less than 3600 seconds, everything will work
fine. but when the processing time is more than 3600 seconds. A page cannot
be displayed message will be shown on the browser.
Any one know why?...
|
by: rsine |
last post by:
I have developed a program that sends a command through the serial port
to our business system and then reads from the buffer looking for a
number. Everything worked great on my WinXP system, but when I tried
the program on the Win98 system it will be running on, I get the
following error:
Cast from string "2076719" to type 'Long' is not valid
I am not sure why I only get this error on the Win98 system or how to go
about correcting...
|
by: Alexander van Doormalen |
last post by:
I am trying to run an external process (command tool) within a Windows
Service with the specified account. When the application launches I get
a error dialog with the following message:
Application popup: <COMMAND TOOL> - Application Error : The application
failed to initialize properly (0xc0000142). Click on OK to terminate
the application.
I use the following code to start the process (not relevant code is
stripped):
| |
by: lai_waiman |
last post by:
Dear All,
I have problems on doing some long lasting job in a web services.
Let me first provide some background information first.
I have a ASP.NET web page, which will call another Web Services to preform a
task. Since that Web Service Task last for a quiet long time (eg. 1 hr). If I
return the result after the long task, I am sure that the client browser will
be timeout. So I decided to use threading inside the Web Service. My...
|
by: Ralph |
last post by:
Okay I have a website where the user is going to hit a button to kick
off a process that is going to take a long amount of time.
Is there anyway without using AJAX, or possibly a windows control on a
page that connects to a webservice to show the user the progress of
this operation.
It seems almost a given that I must use either ajax or some kind of
control to do this.
Any suggestions would be greatly appreciated.
So far I have come up...
|
by: Terry Olsen |
last post by:
I have a web app that gathers live data from network pc's and then
displays it to the client. It worked fine until I was asked to allow the
user to select multiple pc's for display. Now, depending on how many
pc's are selected, can take above 10 minutes to return the results. This
causes clients to timeout if the user selects too many pc's.
How can I set the client timeout property so that it will wait longer
before assuming the web page...
|
by: jr |
last post by:
I have an application the makes a call to a webservice to retrieve some
additional info for my app. The information I get back is
non-essential, so I do NOT want my entire app hanging to wait for this
repsonse if it takes more than, say, 2 seconds to a response from the
webserver.
Basically, how would I immediately end a function that is taking too
long to respond?
--
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |