Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Cronscripts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Cronscripts
Authored by: psychozz on May 07, '04 04:14:21PM
I have a server that acts like a firewall and a router and it's also my apple share server. So I was thinking of making two scripts, one that set the server to day mode and another one to set it to night mode, and add these scripts to the systems crontab

Will this work?

Example (/etc/crontab):

0     7       *       *       *       root    /Library/Scripts/pmset_day
5     0       *       *       *       root    /Library/Scripts/pmset_night
Or if you stay up late on fridays and saturdays it would look like this:

0     7       *       *       1-5       root    /Library/Scripts/pmset_day
5     0       *       *       1-5       root    /Library/Scripts/pmset_night
0     9       *       *       6-7       root    /Library/Scripts/pmset_day
0     3       *       *       6-7       root    /Library/Scripts/pmset_night
You cannot put a sleep script in here because cronscripts don't run if the computer is asleep.

[ Reply to This | # ]