Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

I think, that, from /etc/cron.daily/apt, unattended upgrades use /var/lib/apt/periodic/upgrade-stamp file (not update-stamp).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.