Setting up Cron jobs or Scheduled tasks

There are some actions within Feng Office, that will be done asynchronously (performed in background), without the need of user interaction and therefore need to be somehow triggered. These actions can go from sending notifications and reminders, to fetching emails automatically - if you use Feng Office as a mail client as well - or synchronizing with Google Calendar.

The trigger, will be a cron job (Linux) or a scheduled task (Windows).

Depending on your server hardware and resources, you may decide whether to run it every 1 minute.. or every 24 hours. Nonetheless, Feng Office will also let you decide every how often you would like to perform some actions, but if there is no cron or scheduled task running behind, everything would be rather useless.

You will need to create a cron job that has to run periodically and execute the FENG_ROOT/cron.php file.

You may do it by accessing your crontab running the following command:

 crontab -e 

Then you would have to insert the following line so that the cron runs every 5 minutes for instance - and then save the changes -:

#Run Feng Office cron every 5 minutes
*/5 * * * * php FENG_ROOT/cron.php

Please bear in mind where it says FENG_ROOT it means the directory where Feng Office has been placed at.

In Windows, Cron jobs are called Scheduled task, which should also be running every certain amount of time and executing the following file as well:


When you create your scheduled task from your Control Panel, you will have to make it so that PHP calls the FENG_ROOT\cron.php file

For instance:

c:\PHP_ROOT\php.exe c:\FENG_ROOT\cron.php