Including file into crontab config?
Depending on your cron daemon and your distribution, there should be several directories in /etc where you can put files with jobs for cron.
Scripts (not cron-formatted jobs) placed in the following directories will be executed at the specified intervals. Note that frequency is guaranteed but the exact time it runs may not be. For most users these directories are sufficient:
/etc/cron.hourly
/etc/cron.daily
/etc/cron.weekly
/etc/cron.monthly
cron-formatted jobs (like your examples above) placed in the following directory will be executed by cron at the specified times. Note that in addition to the normal entries the user of the job needs to be specified as well, before the command. For packages and software distributions this method is the best way to distribute cronjobs:
/etc/cron.d
Example of a cron.d formatted command:
1 1 * * * root echo "serverfault is awesome" > /dev/null
Not as far as I know; that's what /etc/cron.d
is for.
As Boscoe has pointed out, there's also the /etc/cron.{hourly,daily,weekly,monthly}
directories, but jobs in there can only run as root (unless you explicitly use /bin/su
to change the EUID). Jobs in /etc/cron.d
have an extra field that specifies the user they run as, and the way your question contains a /home/user
path makes me think you want these jobs to be able to run as arbitrary users.