location of user crontab files?

Karl Vogel vogelke+unix at pobox.com
Tue Aug 11 23:32:32 UTC 2009


>> On Tue, 11 Aug 2009 10:50:54 -0400, 
>> Identry <identry at gmail.com> said:

I> Where are user crontab files stored in the file system?  I want to make
I> sure this info is backed up.

   They're in /var/cron/tabs.  If you're using individual crontab files,
   be sure to rename /etc/crontab or you might have duplicated cronjobs
   running simultaneously.

   I use the file header beneath my signature for crontab files, so I
   don't forget what field goes where.  It's also handy to define an
   environment variable in case a program should behave differently when
   run under cron.

-- 
Karl Vogel                      I don't speak for the USAF or my company


# ====================================================================
# Everything on a line is separated by blanks or tabs.
# Set CRON so scripts know when they're being run non-interactively.
CRON=yes
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
# ====================================================================
#+--------------------------- Minute (0-59)
#|   +----------------------- Hour   (0-23)
#|   |     +----------------- Day    (1-31)
#|   |     |   +------------- Month  (1-12)
#|   |     |   |   +--------- Day of week (0-6, 0=Sunday)
#|   |     |   |   |    +---- Command to be run
#|   |     |   |   |    |
#v   v     v   v   v    v
# ====================================================================
# Jobs queued for later execution
*/5  *     *   *   *    /usr/libexec/atrun
# --------------------------------------------------------------------
# Do daily/weekly/monthly maintenance
1    3     *   *   *    periodic daily
10   22    *   *   *    periodic evening
15   4     *   *   6    periodic weekly
30   5     1   *   *    periodic monthly
..


More information about the freebsd-questions mailing list