Q&A: Which cronjobs run on UCS by default?


Which cronjobs run on UCS by default?


UCS uses cron and cronjobs out-of-the-box mainly for housekeeping. If you want to add your own cronjobs, have a look at https://docs.software-univention.de/manual-4.4.html#computers:Executing_recurring_actions_with_Cron

The following lists cover the default cronjobs of UCS 4.4 with UCS@school and Self-Service installed. Please note that additional components, Apps or third-party software might add their own cronjobs.

Monthly, Weekly, Daily, Hourly

Some cronjobs are executed “once per day” or “once per week”. If you want to know when exactly these cronjobs are executed, have a look at /etc/crontab. The defaults are:

Interval Time
Monthly every first day of the month at 06:52
Weekly every sunday at 06:47
Daily every day at 06:25
Hourly every hour at minute 17, or “seventeen minutes past a full hour”
Cronjob Description Execution Comment
/etc/cron.weekly/man-db update the manual page index caches weekly housekeeping
/etc/cron.daily/apache2 run htcacheclean daily inactive by default
/etc/cron.daily/apt-compat fallback for apt.systemd.daily daily inactive by default, runs as systemd timer instead
/etc/cron.daily/bsdmainutils calendar daily maintenance script daily inactive by default
/etc/cron.daily/cracklib-runtime update password check dictionary daily housekeeping
/etc/cron.daily/dpkg backup the dpkg databases daily housekeeping
/etc/cron.daily/locate update the locatedb database daily housekeeping
/etc/cron.daily/logrotate rotate logfiles according to logrotate.conf daily housekeeping
/etc/cron.daily/man-db update the manual page index caches, remove old cache daily housekeeping
/etc/cron.daily/ntp compress old and delete even older ntpstats daily housekeeping
/etc/cron.daily/passwd copy shadow, passwd files to /var/backups/ daily housekeeping
/etc/cron.daily/quota run warnquota to inform users of their quota daily inactive by default
/etc/cron.daily/sysstat get a summary of process accounting daily inactive by default
/etc/cron.daily/univention-ssl checks validity of root and host certificate and updates the CRL validity daily housekeeping

Please note: “inactive by default” means, that cron does run the cronjob, but the cronjob itself checks for certain conditions. Those conditions are not met by default. For example the quota cronjob checks if run_warnquota is set to true in /etc/default/quota (which is empty/false by default).

Fixed time

Cronjob Description Execution Comment
/etc/cron.d/mrtg create mrtg stats and graphics (CPU, RAM, SWAP) every 5 minutes housekeeping
/etc/cron.d/php remove old session files 09 and 39 minutes past full hour inactive by default, runs as systemd timer instead
/etc/cron.d/postgresql database maintenance (vacuum) 2 minutes past every 5 hours, full vacuum on sundays at 03:10 housekeeping
/etc/cron.d/sysstat get a summary of process accounting every 10 minutes inactive by default
/etc/cron.d/sysvol-cleanup run sysvol-cleanup.py every day at 04:04 only relevant if UCS provides AD DS
/etc/cron.d/sysvol-sync run sysvol-sync.sh every 5 minutes only relevant if UCS provides AD DS
/etc/cron.d/ucs-school-import purge expired users (ucsschoolPurgeTimestamp) every day at 04:50 UCS@school user maintenance
/etc/cron.d/ucs-school-umc-exam-master cleanup UCS@school exam mode every day at 03:30 inactive by default
/etc/cron.d/univention-config-registry-backup create backup of local UCR file backend every day at 03:30 housekeeping
/etc/cron.d/univention-directory-policy read and apply current policies from LDAP 5 minutes past every hour housekeeping
/etc/cron.d/univention-directory-reports-cleanup cleanup old Univention directory report files every day at 00:00 housekeeping
/etc/cron.d/univention-home-mounter unmount unused auto-mounts of homedir every 10 minutes housekeeping
/etc/cron.d/univention-ldap create new Diffie-Hellman-Parameter for TLS key exchange every day at 04:30 housekeeping
/etc/cron.d/univention-ldap-server create and compress an OpenLDAP dump as backup every day at 00:00 housekeeping
/etc/cron.d/univention-mail-postfix recreate dh parameter files for forward secrecy no default, needs configuration inactive by default
/etc/cron.d/univention-maintenance run unattended UCS updates no default, needs configuration inactive by default
/etc/cron.d/univention-mrtg create mrtg stats and graphics (CPU, RAM, SWAP) for UMC module every 15 minutes housekeeping
/etc/cron.d/univention-nagios reads RAID status for optional Nagios check every minute inactive by default
/etc/cron.d/univention-pam run ldap-group-to-file.py for local group cache every 15 minutes housekeeping
/etc/cron.d/univention-server-{master,backup,slave,member} execute server password change (if due) every day at 01:00 housekeeping
/etc/cron.d/univention-ssl copy all host certificates from master every 20 minutes only if server role is “domaincontroller_backup”
/etc/cron.d/univention-system-stats run univention-system-stats every 30 minutes housekeeping
/etc/cron.d/univention-ucr-cronjobs run cronjobs defined manually via UCR (see manual)
/etc/cron.d/univention-updater run updater statistics daily and at reboot housekeeping
/etc/cron.d/univention-updater-check check for available updates 5 minutes past full hour and at reboot housekeeping

systemd timer

Systemd offers an alternative to cron with its timer units. Systemd timers can be run at calendar based time events or on monotonic based time events. By default, the following systemd timers exist on UCS (systemctl status *timer):

  • apt-daily.timer - Daily apt download activities
  • apt-daily-upgrade.timer - Daily apt upgrade and clean activities
  • phpsessionclean.timer - Clean PHP session files every 30 mins
  • systemd-tmpfiles-clean.timer - Daily Cleanup of Temporary Directories

This topic was automatically closed after 72 minutes. New replies are no longer allowed.