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

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.

share|improve this question
    
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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.