Hi,
I have a script that run every 10 minutes, from a specific timeframe of the day, for example 0500 - 1900.
The script is some sort of checker script for an application log file and check for errors and email us if there is error/s reported in the log.
At the moment, I schedule it to start as a cron at 0500, then inside the script I check for whether the hour is less than 1900 and if it is then I continue running the script. In between checks, I have a sleep 600 = 10 minutes. I want to know if this is the most efficientway of running the script.
I've found some information on fork/spawn and daemon, while they sound like 'cool' terminology
I don't really know the concept on whether they apply to what I want for the script.
Does having the script to be able to run within specific timeframe qualify it to be some sort of a daemon?
Anyway, I know one of the resident gurus will be able to shed some light on my over-analyzing what I am wanting to do.
Thanks in advance.