Skip to content

Cron Jobs

The HylaFAX Enterprise packages install the following cron jobs:

/etc/cron.daily/hylafax

#!/bin/sh

# Source HylaFAX EE wrapper
if [ -f /etc/hylafax/wrapper.sh ] ; then
  . /etc/hylafax/wrapper.sh
fi

/usr/sbin/faxcron | mail -s "HylaFAX Usage Report" faxmaster

exit 0

Routine housecleaning in the recvq/ directory is performed by HylaFAX’s faxcron program, which is executed daily from the /etc/cron.daily/ hylafax crontab. For example, if you’re looking to change the expiration time for received faxes, you’ll need to edit the faxcron command in that crontab and to use the -rcv option along with the desired number of days.

/etc/cron.hourly/hylafax

#!/bin/sh

# Source HylaFAX EE wrapper
if [ -f /etc/hylafax/wrapper.sh ] ; then
  . /etc/hylafax/wrapper.sh
fi

/usr/sbin/faxqclean

exit 0
Completed jobs (whether they were sent successfully or not) are stored in the HylaFAX doneq/ directory, and there is a crontab that performs routine maintenance in that directory called faxqclean, which is executed from /etc/cron.hourly/hylafax. You can use the -j option to specify the job age threshold (in seconds) that controls how long jobs may reside in the doneq/ directory before being removed.

/etc/cron.d/hylafax-enterprise-web

0 0 * * * uucp  /var/www/fax/includes/webfaxcron.php -t 0 -i 30 > /dev/null 2>&1
usage: webfaxcron.php -i num-days -d num-days -t num-days options:

-i num-days prune Inbox of faxes older than number of days
-d num-days delete faxes from Inbox/Archive that are older than number of days
-t num-days clean web temporary directory of files older than number of days

For example, if you want to Archive all faxes older than 5 days, and remove archived faxes older than 30 days, you might run:

/var/www/fax/includes/webfaxcron.php -t 1 -i 5 -d 30

The webfaxcron script should already be scheduled in the /etc/cron.d/hylafax-enterprise-web crontab to clean the temp files in /var/www/fax/tmp/ at midnight every night.

Deletions from the archive are noted in the web interface SysLog: for each removed fax there's an entry:

prune_archive> deleting faxid '#'