Is this right, for 00:00 hrs. every 15th of December for every day of the week?
Code: Select all
0 0 15 12 * root /usr/bin/date | date --set | hwclock --set --date
Code: Select all
0 0 15 12 * root /usr/bin/date | date --set | hwclock --set --date
It looks correct but I'd /path/to/date and /path/to/hwclockmzsade wrote:...Is this right, for 00:00 hrs. every 15th of December for every day of the week?Code: Select all
0 0 15 12 * root /usr/bin/date | date --set | hwclock --set --date
Code: Select all
#!/bin/bash
/usr/bin/date | /usr/bin/date --set | /usr/bin/hwclock --set --date
Code: Select all
0 0 15 12 * root /path/to/your/script.sh
Yes.mzsade wrote:Will the cron job be aborted for a particular day if the computer happens to be powered off at the scheduled time?
Code: Select all
#!/bin/bash
set -x
/usr/bin/date | /usr/bin/date --set | /usr/bin/hwclock --set --date
Code: Select all
date | date --set
Code: Select all
date: option '--set' requires an argument
Code: Select all
date --set=STRING
Thanks, that's a very useful link to explore. What i intend is to schedule synchronization of h/w and system clocks with the output of "date" on given days. Now this gui based app, system-date-admin does it very well, only i don't know how to use cron with it.Habitual wrote:This may help...
http://www.cyberciti.biz/faq/howto-set- ... nd-prompt/
What's wrong with using an NTP Server to set the clock/date?
Code: Select all
hwclock --systohc
Code: Select all
hwclock --systohc