Periodic tasks (cron)

Some tasks should be run periodically via cron.

Sending of scheduled messages

Sending of daily e-mail reports

Statistics aggregation from routelog into emgp_hourly_summary

Replace "" with the base url for your installation of EMG Portal.

# Send daily report for current month shortly after midnight
5 0 * * *   /usr/bin/wget -O - >/tmp/cron_report.log 2>&1
# Send scheduled jobs every 5 minutes
*/5 * * * * /usr/bin/wget -O - >/tmp/cron_send.log 2>&1
# Aggregate new message stats when present, check every minute
* * * * *        /opt/emg/bin/ >>/tmp/cron_hourly_summary.log 2>&1

In order for cron requests to work you need to add the ip address which accesses cron urls to 'cronAllowedIps' array in EMG Portal protected/config/main.php.


The script is included in EMG Portal distribution as "".

Copy it to a location of your choice, change the database settings in the script and add it to cron as in the example above with the path adjusted to your system setup.