How do I schedule an import that repeats by itself?
A scheduled task applies a mapping template to a file or a folder every so often, without anyone logging in to the programme. It is used to receive a supplier’s catalogue every day or the new customers another system exports.
What do I need before I start?
Two things, and both must be prepared first:
- A mapping template saved for the target you want. The task has no mapping screen of its own: all the correspondence between columns and fields comes from the template. It is prepared in the import wizard.
- A file or folder path the server can reach, the server where the ERP runs. It isn’t a folder on your computer: it is a path on the server. If you don’t know which one to enter, ask whoever administers the installation.
Go to Management › Scheduled imports.
How do I create the task?
- Click New task.
- Name: how you will recognise it in the list.
- Mapping template: the one that defines the target and the columns.
- Source (fixed file or folder): the full path. It can be a specific file (
C:\Datos\entrada\clientes.csv) or a folder (C:\Datos\entrada). - File pattern: only if the source is a folder. With
*.csvall the CSV files inside are processed. Leave it empty if the source is a fixed file. - Frequency (hours): how often it runs. It accepts decimals:
0,5is every half hour. - Mode: Create only (skip existing) or Create and update existing.
- Tick Move processed files to the ‘procesados/’ subfolder if you want each file to be moved aside when it finishes, so that it isn’t read again.
- Leave Task enabled ticked and click Save.
When you save it as active, the task is queued to run straight away, not after one frequency period. That is how you test it: save it, wait a minute and refresh with Refresh.
What happens when the task runs?
Exactly the same is done as if you had imported the file by hand through the wizard: it is read, the template is evaluated, the rows are validated and the valid ones go in.
The difference is that nobody reviews anything along the way. A row with an error doesn’t stop the run: it stays as an issue and the rest go in. The whole file is recorded in the wizard’s Import history, with its issues, just like a manual import.
When the source is a folder, all the files that match the pattern are processed, in alphabetical order, one after another. A file whose extension the programme doesn’t recognise is skipped without warning.
When it finishes, the task records the date in Last run and a summary in Last result, along the lines of 3 file(s): 120 imported, 2 with errors. If it has processed something, a notification is also published in the programme.
How do I stop it or change it?
In the list, the box in the Active column switches the task on and off. Switching it off clears its next run; switching it on queues it again to run now.
Edit opens the same record as when it was created. Delete removes it, after asking for confirmation; it can’t be undone. Deleting the task doesn’t delete anything it has already imported.
The Next run and Last run columns tell you whether it is working. If Next run moves on but Last result says No files to process, the path is wrong or the folder is empty.
Which company does the data go into?
Into the company you were in when you created the task. Each task belongs to one company and the imports it generates always go there, even if the system runs them on its own at three in the morning.
Templates, on the other hand, are common to all the companies in the programme: the same template can feed two tasks in two different companies.
If something goes wrong
| What you see | What has happened | What to do |
|---|---|---|
| Last result: ‘No files to process.’ | The path doesn’t exist, or the folder has no files that match the pattern | Check the path and the pattern; remember it is a path on the server |
| Last result: ‘Mapping template does not exist.’ | The template has been deleted | Assign another template to the task |
| The same file is processed over and over | The file stays in the folder | Tick Move processed files |
| The data is repeated on every pass | The mode is Create and update and the file is read again | That is correct: nothing is duplicated, it is only rewritten |
| ‘Choose a mapping template.’ when saving | The template is missing | Prepare it first in the wizard |
| The task never gets to run | It is disabled, or there is no next run | Tick the Active box |
See also: Prepare an import template · Review an import that has been done