Skip to end of metadata
Go to start of metadata

If you are running a multi-tenant system with FileCloud, make sure all site URLs for each site is accessible from the local site. This is used by the task scheduler/cron to run automated tasks for each site

Introduction

FileCloud needs a cron job to perform certain ongoing maintenance tasks.
These tasks include:

  • Sending email notifications such as file change notification, share notification etc.,
  • Sending admin summary emails
  • Perform recycle bin cleanup
  • Delete expired shares
  • Archiving old audit records
  • Perform periodic workflow tasks (if configured)
  • Send SPLA reports ( only in case of SPLA licensing)
  • Perform backup jobs (only in case of backup server)

Setup Cron Job in Windows

Open the FileCloud Control Panel and click on "Install" in the Cron Task.

Then click on the "Start Button" to start the Cron Task.

 

 

Additional Settings for the Cron Task are available by editing the xampp\cron.ini file

[settings]
frequency=300 ---> Frequency of Cron (Default is every 5 mins)
timeout=600 ---> Time to wait for Cron to complete (Default is 10 mins)

 

Setup Cron Job in Linux

Prerequisite

To run from a cron job,

  • mongodb extension should be enabled in PHP CLI mode. 
  • Ioncube extension needs to be enabled for PHP CLI mode 

To enable ioncube extension, do the following

sudo cp /etc/php5/apache2/conf.d/01ioncube.ini /etc/php5/cli/conf.d/

 

To enable mongodb, the following line should be added to the end of PHP ini file.

 

extension=mongo.so

In Linux, php.ini file should be under /etc/php5/cli/

How to set up Cron Job in Linux:

  1. Open the crontab  (assuming apache is running under www-data account).

     

    crontab -u www-data -e

    In case of centOS, use the following:

    crontab -u apache -e

    At the end of the crontab file add the following line to schedule Notifications every 5 minutes.

    For Ubuntu 14.04 or Debian,

    */5 * * * * php /var/www/core/framework/cron.php

    For Ubuntu 16.04 or centOS, 

    */5 * * * * php /var/www/html/core/framework/cron.php

    The above command assumes your FileCloud installation is under /var/www/ folder.

     

  2. Save and Exit

 

Set up Scheduled Task in Windows (Alternative to Cron Service)

 

  • Use Notepad or similar program to create a new file named "fccron.vbs" in a location like c:\xampp\htdocs\resources\backup folder.  
    Enter the following contents from the code block below and save the file. Additionally, in the code block below ensure that paths to php.exe and cron.php files are correct.

 

CreateObject("Wscript.Shell").Run "C:\xampp\php\php.exe -f ""c:\xampp\htdocs\core\framework\cron.php"" ", 0, False
  • Open "Task Scheduler" 


 

Click Create Task in the right menu under Actions

General Tab

 

Set the Name "FileCloud Notifications"
Under Security options, select run whether user is logged on or not.

Triggers Tab

 

Click New Trigger
  • Select "On a Schedule"from Begin the task drop down
  • In Settings->Select "Daily"and select a time and then select "Recur every 1 days"
  • Under Advanced Settings - Check Repeat Task every 5minutes (you can adjust ifyou want more frequent notifications)
  • Select "indefinitely"forthe duration of dropdown.
  • Check Enabled.
  • Click OK

Actions Tab


 

  • Click New Action
  • From the Action drop down, select "start a program"
  • Enter the path to fccron.vbs file in the Program/Script text box. (e.g. c:\xampp\htdocs\resources\backup\fccron.vbs
  • Click OK
  • You might need to set the "Start In" Parameter to "c:\xampp\htdocs\resources\backup" folder in case of any problems.

All other settings can be default, unless you need to change them for a different reason.

 

Verify Cron Job is Running

Open the FileCloud admin interface. Go to Checks from the left menu. Under Extended FileCloud installation checks, please check Cron Status as shown below

 

 

  • No labels