I want a special command to be lauched everyday, but dont want to put it in the /etc/cron.d/ because its a user specific user!
pg@pipoTower: ~$ crontab -l
# m h dom mon dow command
0 0 * * * updatedb -l 0 -o ~/.externalharddisk.db -U /var/autofs/removable/usbData
The crontab -e command which puts the file in /var/spool/cron/crontabs/userName
but dont know why its not called by anacron....
usr@Tower: ~/$ cat /etc/anacrontab
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root
# These replace cron's entries
1 5 cron.daily run-parts --report /etc/cron.daily
7 10 cron.weekly run-parts --report /etc/cron.weekly
@monthly 15 cron.monthly run-parts --report /etc/cron.monthly
/var/spool/cron/crontabs/, cron is. anacrontab is the program that calls whatever is in cron.daily, .weekly, and .monthly. – Alaa Ali Jun 02 '13 at 13:01/var/spool/cron/crontabs/to be called by anacron? – Philippe Gachoud Jun 03 '13 at 13:08cronautomatically calls those files. In your question, you have already created a crontab for the userpgto run thatupdatedbcommand every day at midnight, right? Then that's it, your cronjob is functional now. If you want to check if it's working, docat /var/log/syslog | grep CRON | grep updatedb, you should see a line(s) likeCRON[###]: (pg) CMD (updatedb -l 0 -o ~/.externalharddisk.db -U /var/autofs/removable/usbData). If you do, then your cronjob is working. – Alaa Ali Jun 03 '13 at 13:30cronandanacronwill never turn on the computer to run cronjobs. From my search, what you're looking for is to combine the toolrtcwakeand cron.rtcwakecan be used to suspend your machine and to specify a time for it to wake up automatically. You can read this, this, and this. – Alaa Ali Jun 06 '13 at 06:22