Reputation: 3885
I have a common settings file
shared between PHP
and my client's javascript
to read from.
My server is using another (external) server [that is down quite often] for a specific validation
.
The common settings file
is specifying whether that validation
should be carried out or not.
I would like my server to change the common settings file
to not to check upon server down for about 30 minutes and then change the setting back again (the setting is "0"/"1").
I thought I should write a script that is run upon first occasion of server down.The script would go ahead and look something like that:
change_settings_file("DO_VALIDATION",0);
sleep(30*60);
change_settings_file("DO_VALIDATION",1);
so:
Thanks!
Upvotes: 0
Views: 46