3.13. Cron Jobs

Cron jobs are in the cronjobs/ directory and the crontab.in file contains a sample crontab. This gives you the basic cronjobs for updating certain statistics and data on the site.

cronjobs/cvs-cron/ contains scripts useful for creating blank cvs trees and managing the /etc/groups, /etc/passwd and /etc/shadow files. See cronjobs/README.root and CVS plugins section for more info.

cronjobs/mail/ contains files useful for the creation of new mailing lists in mailman and creating the /etc/aliases file.

Prepare for cronjobs/cvs-cron/usergroup.php and cronjobs/mail/mailaliases.php.

# adduser anonymous
# cp /etc/aliases /etc/aliases.org
# cp /etc/shadow /etc/shadow.org
# cp /etc/passwd /etc/passwd.org
# cp /etc/group /etc/group.org

Note

There are two other ways to authenticate GForge users: LDAP and NSS with PostgreSQL backend. They are not discussed in this guide.

Caution

The cronjobs/cvs-cron/usergroup.php cron script will meddle with your /etc/passwd, /etc/group, and /etc/shadow files. By default, this cron will save these files with a .new extension. You will have to edit the cron script to remove the .new extension, but you must make sure that it is properly generating your files or your server could be unusable.

Warning

The following command will blow away any existing root crontab:

# crontab cronjobs/crontab.in

Now edit the paths to the cron scripts by setting the value of GFORGE and PHP variables:

# crontab -e

Uncomment entries for cronjobs/cvs-cron/usergroup.php, cronjobs/mail/mailing_lists_create.php, and cronjobs/mail/mailaliases.php but not before understanding the consequences.