Hi there,
This is a bit generic but I hope you can understand (it would take too long to explain the actual problem - and this is just as good). Here's the situation:
This script gets executed every 10 minutes:
The problem is: if I simulate a hardware failure (do a hard reset) then the script will never execute again.
I am able to find out where the script needs to continue from, it's just getting the script to actually get past that if statement and start again.
How would I go about this?
Thanks.
EDIT:[/] Solution is to use flock as they are reset if the computer is reset.
This is a bit generic but I hope you can understand (it would take too long to explain the actual problem - and this is just as good). Here's the situation:
This script gets executed every 10 minutes:
Code:
if ( var_x != 1 ) //var_x is read from an external file
{
var_x = 1; //written to external file...obviously
//
// lots of time consuming script here writing data to files.
//
var_x = 0; //written to external file...obviously
}
else
{
//stop script - nothing else todo.
}
The problem is: if I simulate a hardware failure (do a hard reset) then the script will never execute again.
I am able to find out where the script needs to continue from, it's just getting the script to actually get past that if statement and start again.
How would I go about this?
Thanks.
EDIT:[/] Solution is to use flock as they are reset if the computer is reset.
Last edited: