Bash time of day processing
I need to have a script act depending upon the time of day in response to a real time event. Since this is real time, CRON would not work here.
Here is some psuedo code where I need to replace what is between the [ ] of the 'if' statement.
if [ (current time is between 8:00AM and 5:00PM) ]
then echo "STATEMENT PROCESSED"
else echo "STATEMENT NOT PROCESSED"
fi
# or
if [ (current day is Monday thru Friday) ]
then echo "STATEMENT PROCESSED"
else echo "STATEMENT NOT PROCESSED"
fi
Thanks
|