I would like to run a job, which will execute the below command every week.

$ dpkg --get-selections > /home/me/package_list.log

So I tried the following.

$ sudo crontab -e

Added entry like this,

0 2 * * * dpkg --get-selections > /home/me/package_list.log

But it doesnt work. What am I missing and what can I do to fix this?

Thank You.

link|improve this question

20% accept rate
Sure seems like that should work. Is there anything showing up in your syslog? Or was there any mail sent to you? Personally I would just place a script in /etc/cron.weekly. – Zoredache Dec 7 '10 at 0:15
Check /etc/cron.deny and/or /etc/cron.allow. Also, a minor point, but the crontab line as it currently appears will run every day, not just once a week. – Steven Monday Dec 7 '10 at 2:20
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.