Help: (Downloaded) Installing & Configuring

Setting Up A Cron Job

A cron job is simply a scheduled task that runs regularly on your server. Most administrators would set up a cron job to run regularly scheduled backups on the server, for example. In a Windows server environment, you would need to set up a “Scheduled Task” instead of a cron job. Cron jobs and scheduled tasks should be set up by a qualified server administrator. If you are uncomfortable with the instructions below, we highly recommend contacting your server administrator for assistance.

Though it technically isn’t required for the software to run, it is recommended that you set up a cron job on your server to run the admin/cron.php file every five minutes. Having this cron job (or scheduled task) set up on your server will ensure that large campaigns and imports keep running even when you are not logged in to the software. Furthermore, the cron job will ensure all scheduled mailings run on time, bounce management runs periodically, and any other automated tasks (such as autoresponders or database syncs) run on their own.

Unix/Linux Servers

If your server is Unix-based, setting up a cron job can be done through SSH. Typically, typing in crontab -e in to the command line will allow you to edit your server’s crontab. Alternatively, typing crontab example.txt in to the command line will set the contents of a specified text file (such “example.txt”) as the crontab.

Again, the cron job simply needs to run a single php file — cron.php, located in the admin folder — every five minutes. There are a few different ways to do this. Example commands that you might want to type in to your cron tab are:

*/5 * * * * php /path/to/httpdocs/emailmarketing/admin/cron.php

-or-

*/5 * * * * wget http://www.yourdomain.com/emailmarketing/admin/cron.php  > /dev/null

Both of these commands accomplish the same thing — again, the object is to simply make a call to the cron.php file in our software distribution, every five minutes. These are just example commands, so make sure that you change the file path or URL to your own path/URL.

NOTE: Cron jobs and scheduled tasks can usually be configured through CPanel and Plesk as well. If you prefer a graphical interface, setting up the cron job through CPanel or Plesk (if either of these web-based interfaces are set up on your server) may be a simpler solution.

Windows Servers

If you have a Windows server, you must set up a scheduled task. Each version of Windows has a slightly different task scheduler, so instructions will vary widely from version to version. However, the Windows task scheduler can usually be accessed within the server’s Control Panel. For help with setting up a scheduled task on your Windows server, we recommend asking a qualified Windows server administrator, or searching through Microsoft’s online knowledge base on microsoft.com.

An example of a command you might want to enter in to Windows’ task scheduler may look like this:

C:\path\to\php\php.exe C:\path\to\emailmarketing\admin\cron.php

Make sure that the path to where PHP is installed on your server is entered in before the cron.php file path. Be sure that you change the file paths in the above example command to your own correct file paths.

Further Configuration of Scheduled Tasks in the Software

After you have configured the cron job on your server, you can customize the frequency and times that specific features in our software are executed even further. To do this, log in to the Email Marketing software, and click Settings. There will be an option saying “Scheduled Tasks,” and on the Scheduled Tasks page, you can edit or disable various different features in our software. This blog post discusses Scheduled Tasks more in-depth: Overview of Scheduled Tasks

Related posts:

  1. Installing ActiveCampaign on your own server

Webinars & Personalized Training


Stay Connected

Get news and updates

RSSFrom Our Blog

  • Updated Zapier Integration

    We’ve improved our integration with Zapier to include many more triggers, another action, and support for custom fields....

© 2003–2013 ActiveCampaign, LLC All rights reserved.