Automated imports setup for server

If you set up automatic periodic export of data from HansaWorld you might want to automatically import them into your account. To do that you need to do three things:

  1. Create a folder for the files to be imported from

  2. Ensure that the export files are placed in that folder (by any means available to you)

  3. Change configuration of to start checking those folders

Creating folder structure

You need to create one folder import in the root folder of the server. This folder then will contain a folder for each account you want to perform the automatic import. I.e. you might want to keep some accounts not up to date (historical data) and update others. This is why you need to create a folder for each of the accounts you want to automatically update. Name of each of these folders is the ID of that account. You can find out the ID of an account by looking at the URL when you open that account in the browser.

For example if you see a URL in your browser:

The ID of this account is 12 and you need to create a folder called 12 under the folder import. So the end result might look something like this:


Make sure that these folders have full access right for the server user running the eazybi server as it needs to move and rename the files in the folder.

Moving the data files

There are various ways how to move files from HansaWorld server to server and you should consult you IT staff for the best one available for you. Usually this will be done using either an FTP or SFTP server, mounting a folder as a network file system and then moving the files around with a shell or bash script.

The regularity of the file movements should be aligned with how often they are being exported from HansaWorld.

Changing configuration

Finally you need to instruct server to check the created folder for data files to import. You can do this by editing configuration file:


You need to add a new or modify the existing configuration block with contents to run every X minutes:

# Add custom regular jobs and specify frequency in "every" or "cron" parameter
job = "SourceFile::AutomaticImporter.start_automatic_file_import"
# every = "15m"
cron = "*/15 * * * *"

Make sure you get the indenting right and restart the server for the changes to be applied.

You can of course change the regularity of the imports in the normal cron format.