debian - running unattended-upgrades on a particular day of the week
- by dastra
We're running unattended-upgrades on debian squeeze, and would like it to run once a week, only on a Wednesday morning.
To attempt this, we have set:
APT::Periodic::Unattended-Upgrade "7"
in /etc/apt/apt.conf.d/50unattended-upgrades
And then touched the /var/lib/apt/periodic/update-stamp to set the timestamp to a Wednesday, for instance:
touch -t 201211280000 /var/lib/apt/periodic/update-stamp
Running:
stamp=$(date --date=$(date -r /var/lib/apt/periodic/update-stamp --iso-8601) +%s 2/dev/null)
date -u --date="1970-01-01 $stamp sec GMT"
Gives the correct timestamp:
Wed Nov 28 00:00:00 UTC 2012
However, unattended-upgrades then seems to ignore this, and run the updates on a Saturday morning.
Could anyone enlighten me as to how this parameter works, and how to set up upgrades to run on a Wednesday?