reports: new project-disk-use.sh report
[girocco.git] / cron / girocco
blob97c94cbc228be96590d72a44a117ca50749e810d
1 # This file collects all the startup jobs needed
2 # for girocco into one place.  It can be placed
3 # into the /etc/cron.d/ directory and then the
4 # system restarted.
6 # Alternatively the individual items could be
7 # placed into the repo and root per-user crontabs
8 # or made into a startup script that uses su, but
9 # it's much simpler just to put them in the global
10 # crontab so they're all in one place
12 # For systems that do not support /etc/cron.d and/or
13 # the @reboot notation, adjustments will need to be
14 # made such as making use of a startup script like
15 # /etc/rc.local and/or adding items directly to
16 # /etc/crontab.  Additionally ionice -c3 may also need
17 # to be replaced with something like nice -n19 instead
18 # on systems without ionice.
20 # IMPORTANT: Be sure to update the users/paths
21 #            below before using to match Config.pm!
24 ## girocco tasks that run as root
27 # The ssh daemon for git ssh access in the chroot jail
28 # Note that on FreeBSD like systems these two commands (or similar)
29 # should be run just before the chroot command:
30 #   /sbin/devfs -m ~repo/j/dev ruleset 4
31 #   /sbin/devfs -m ~repo/j/dev rule applyset
32 # Note that sshd is run with -u0 to avoid unnecessary DNS lookups
33 @reboot         root    cd ~repo/j && /usr/sbin/chroot ~repo/j /sbin/sshd -u0
36 ## girocco tasks that run as repo
39 # Update the gitweb project list cache from Girocco gitweb.list file every 8 minutes
40 # Currently only project creation updates the gitweb.list file
41 */8 * * * *     repo    /usr/bin/ionice -c3 "$HOME/repomgr/jobs/gitwebcache.sh"
43 # Do a git fetch origin and if any new commits are present on the branch then
44 # merge them in and if successful run make install (but not as root) every 15 minutes.
45 # The branch name to use is hard-coded in updateweb.sh and should be updated before
46 # enabling this item
47 #*/15 * * * *   repo    /usr/bin/ionice -c3 "$HOME/repomgr/jobs/updateweb.sh"
49 # Kill stale connections every 6 hours
50 0 */6 * * *     repo    "$HOME/repomgr/toolbox/kill-stale-daemons.pl"
52 # Backup the database files ($chroot/etc/passwd, $chroot/etc/group) once a day.
53 # Nine rotating backups are kept, run this more often if needed.
54 19 5 * * *      repo    "$HOME/repomgr/toolbox/backup-db.sh"
56 # Report project disk space usage once a week with an email to admin
57 #23 7 * * 3     repo    "$HOME/repomgr/toolbox/reports/project-disk-use.sh" -m 100
59 # The job daemon and task daemon are run in a screen
60 # The ../screen/screenrc file needs to be installed to
61 # ~repo/.screenrc to support the SCREENCOMMAND functionality.
62 # Note that some systems may want to add the -U option to screen to
63 # force it to start up in UTF-8 mode.
64 @reboot         repo    env SCREENCOMMAND='source "$HOME/repomgr/screen/girocco"' SHELL=/bin/bash /usr/bin/screen -d -m