Sleep and Wake scheduling
I have the concept of a script that enables a user to schedule when the machine goes to sleep and when it wakes up.
I have written a bash script that writes everything directly to the user crontab file. The minutes (21), hour (20), and seconds to wake (14400) up are written to the crontab file like so:
Script1.txt is the first script that I describe.
Script2.txt is the second script that I describe.
going_to_sleep.txt is the file that I would like to be edited by the second script.
I have been playing with this idea some more and I cleaned up my script a little bit. The new file name is script3.txt. I am trying to get the date part to actually say the adjusted time for sleephours and sleepminutes. I can make the date command state the date with an adjusted hour with no issue. It is when I add the sleepminutes variable to it is when I get errors. Anyone know how to adjust the hour and minute of the date command at the same time?
|All times are GMT -5. The time now is 06:42 PM.|