Does cron job remain in effect after computer reboots?

I have set up cron jobs using the following command

crontab -e

It seems that if a cron job is scheduled to run within the same day (i.e. computer has not been rebooted), then the cron job runs OK. However, if a cron job is scheduled to run several days later (i.e. computer has been rebooted at least once), then the cron job would be missed.

Moreover, every time when I use "crontab -e" to edit the crontab file in the "nano" editor, the top line shows that I am editing a different file, e.g.

File : /tmp/crontab.PLwi9Z/crontab
File : /tmp/crontab.degfpN/crontab
File : /tmp/crontab.odqbkT/crontab

I want to know that is this normal for crontab and how to schedule a job to run several days later (i.e. after several reboots). I am using an Ubuntu 12.04 amd64 system.

Thanks for any suggestion.


Moreover, every time when I use "crontab -e" to edit the crontab file in the "nano" editor, the top line shows that I am editing a different file, e.g

The crontab -e command is 'smart', it makes a temporary copy of the file for you to edit. When you save the file it checks that the file is (reasonably) correct before installing it into the correct location on your system.

I want to know that is this normal for crontab and how to schedule a job to run several days later

If your system is turned off when a crontab entry should run then it will be missed. This is normal. If you have jobs that should run even when they have been missed by the system being powered off then take a look at anacron.