View Full Version : Javascript disable on server restart

09-30-2011, 02:18 PM
I have a server that when restarted emails from the code below every single time. I would like to know what I can use in the code below to regonize the restart and bypass the email send piece in BOLD below.

Any help will be greatly appreciated.

now = currentDateTime()
if (statusInOverride != lastOverrideValue) or (overrideTime != lastOverrideTime)
lastOverrideValue = statusInOverride
lastOverrideTime = overrideTime
if statusInOverride.value == true
overrideStopTime = now
overrideStopTime.minute = now.minute + overrideTime
// Also send an email
overrideHours = overrideTime / 60
mailSend(address, suiteName + " Overridden", suiteName + " has been overridden for " + overrideHours + " hours.");

mailSend(address, suiteName + " Override Canceled", suiteName + " has canceled their override. There was " + remainingTime + " remaining.");
remainingTime.duration = 0

if statusInOverride.value == true
remainingTime.duration = delta(now, overrideStopTime)

09-30-2011, 07:05 PM
I am not aware what kind of server you are using...

but is would be the usual scenario...

you can use the application level attribute to detect the server start. read the value of that attribute, if true, bypass the mailSend feature and set its value to false, so that next time it mailSend can work.

Also, the value of this attribute won't be set to true until the server is restarted.

Thanks & Regards,
Niral Soni

09-30-2011, 07:56 PM
thanks for your help, but I was looking more for the actual code than an explanation. I am not super preficient with JAVAscript.

thank you though,

09-30-2011, 10:30 PM
your problem has nothing to do with JavaScript...
JavaScript runs at client side....It can not control or fetch the state of your Server, until and unless valid information is available..

Anyway, which server technology you are using ?
May be we can help you out after knowing that ...

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum