View Single Post
Posts: 47 | Thanked: 31 times | Joined on Jul 2010
#5
Originally Posted by impeham View Post
alarmd is not an option - the trigger for this script is dbus event - i do not want it to run in certain hour (if i did - i would know what time it is running).

I will definitely need help in making such a command in shell script (format the strings of course) since i am very weak at this:
the .sh script will be something like this is pseudo code:

if [ time is between 16:00 to 18:00 ]; then
[run the command]
fi

Thanks!
Code:
hr=`date +%H`
if test $hr -ge 16 -a $hr -lt 18
then
# do something here
fi
 

The Following 2 Users Say Thank You to ZedThou For This Useful Post: