Support » Knowledge Base » Mail »
WebAsyst Mail allows specifying a certain time and date for scheduled dispatch of email messages. To make such scheduled emailing work on your server, setting up a so-called cron job is required.
Note: Users of the WebAsyst online services do not have to perform setup described in this article.
To do so, find out the path to the executable PHP file and the path to the server directory where WebAsyst is installed to access the automatic job launching script in file /kernel/includes/robots/launcher.php. Those paths should be specified as parameters in the following command (in one line):
{path to executable PHP file} launcher.phpBelow is provided a description of the cron job setup on different server types.
C:\\php\php.exe C:\\htdocs\kernel\includes\robots\launcher.php
Select the time of the first run:
Start time 0:02The value of the Start time parameter in this example means that the mail will be sent out on the second minute of every hour on a daily basis starting with the current day. You will have an option to schedule the mailing function at a shorter time rate as you continue with the Scheduling Tasks Wizard.
Perform this task: Every Day
Start Day: current date
Note: If you do not enter a password here a scheduled task may not be executed.
crontab -u user -e
(where user is the name of the system user under which the task is executed). Using the parameters specified in the example, add the following string (in one line):
2 * * * * /usr/local/bin/php /var/www/kernel/includes/robots/launcher.php
where 2 * * * * means that the command will be run on the second minute of each hour every day of each month. To schedule the command to be executed on a different minute of each hour, change the first value accordingly. You can read more about the crontab command for Unix-like systems at http://en.wikipedia.org/wiki/Crontab.
Note: If you are running WebAsyst on a virtual web hosting, you can specify the required settings for mail scheduling in the web hosting control panel (assuming this feature is supported by your web hosting provider). The procedure of setting up a cron job in different control panels may vary but the general idea is to run the following command at certain time intervals (in one line):{path to executable PHP file} launcher.php