Documentation
Cron configuration (mailing, batch)
Configure the automatic launch of regular tasks (mailing, cleaning of temporary files, statistics)
Linux
Call the page http://host.com/Kernel/private/recron.php in a navigator. This PHP script automatically creates the necessary cron entries.
To verify your cron entries were correctly configured, execute this command in a shell on your server :
crontab -l -u www
www is the user who owns the scheduled tasks (it's also the user who runs the webserver). It can also be www-data, nobody, apache, depending on your linux distribution.
Be sure to have a command line version php installed on your server and be sure that its path is correctly written in config.inc.php before running the recron script.
Be sure to allow PHP to open URLs (allow_url_fopen) because mailings are started by calling http://localhost/Residents/projectname/Kernel/private/send_mailings.php
To check everything is working fine call the mailingQueue script on the command line (as crontab will do it) :
/usr/bin/php /var/www/html/Kernel/private/mailingQueue.php
If an error message is displayed check the preceding points (especially allow_url_fopen).
Windows
- First call the page http://host.com/Kernel/private/recron.php in a navigator. This PHP script creates batch files in Files/tasks/ : mailingQueue.bat and dailyTask.bat
- Then create a scheduled task(Configuration panel) running the mailingQueue.bat file every minute. This batch is used to send the newsletters.
- Finally create a scheduled task running the dailyTask.bat every day at midnight. This batch is used to prepare statistics ready for consultation, to clean temporary files.