Script to say a script has run
Got an unusual one. I have a script which runs every 6 minutes, importing data. It is at a remote location and means I can't be on hand to check it is still active (it usually is but power-outs etc can stop it running).
I'm trying to write a script which will notify me all is well. I know I can get the script to send me an email on complete but I don't want an email every 6 minutes as my inbox would obviously be inundated.
Anyone think of a way I could get it to run say every hour or 12 hours? I thought about an incremental counter when the routine completes then send me an email when the number rises by say 10 which would give me an hourly email. Surely there must be an easier way?
You could set a scheduled script to run from FMS every day or whatever frequency you require.
The script could look at a global field counter that increments every time your import script is run. It could then send you an email with the value from the counter field, and then reset the counter value to 0.