Background Tasks
Package: BASIC
1. General
Scheduled background tasks (cronjobs) can be used to run actions automatically.
Background task “Report scheduling”: This background task automatically sends [Reports]() to selected email recipients (users or groups) at the times defined in the report. Depending on the configuration, the reports are attached as PDF, CSV or both.
Example: On the 1st of every month, the managing director receives the current revenue figures for the previous month.
1.1. Overview of background tasks
Under the settings item “Global Settings - System Automation - Background Tasks”, an overview of the background tasks is displayed, where they can also be configured:
System Automation - Background Tasks
The background tasks are thematically divided into three areas (see screenshots above):
1.2. Column headings
Each thematic area of the background tasks has a tabular overview with the following table headings:
- Status → Display of whether the background task is active/inactive. Using the toggle, the background task can be activated (toggle on the right and toggle colour orange) or deactivated (toggle on the left and toggle colour grey).
- Name → Name of the background task. On mouseover, a short description of this background task is displayed.
- Defined interval → Display of the defined interval at which the background task is run.
- Last run → Display of the date and time when the background task was last run.
- Next run → Display of the date and time when the background task will next be run.
- Running since → If a background task is currently running, this shows since when it has been running.
- Last edited by → Display of which user last edited the background task.
- Last edited on → Display of when the background task was last edited.
- Action → When clicking the “three dots” icon, the available actions for the respective background task are displayed.
2. Background tasks and their functions
2.1. Standard
| Background task | Description | recommended interval |
|---|---|---|
| Report scheduling | The background task automatically sends Reports to selected email recipients (users or groups) at fixed defined times. The reports are attached as a PDF, CSV or PowerPoint file (for report sets). | Every hour |
| CSV Update | This background task controls the intervals at which the system searches for any available CSV update definitions and then processes them. | Every hour |
| CSV/ICS Import | This background task controls the intervals at which the system searches for any available CSV import definitions and then processes them. | Every hour |
| Exchange Online | The background task is needed to maintain user authentications between the brainX system and an Exchange Server. Furthermore, any interrupted synchronisations can be resumed and completed. | Every 30 minutes |
| Geodata determination | The background task governs the interval at which the geodata of new records is determined. | Every 5 minutes |
| Deletion routine | The background task automatically deletes records in the Recycle Bin module at the defined time interval. | Every day |
| OAuth refresh | The background task ensures that existing OAuth authentications of email accounts do not expire. Email accounts, the central mail server as well as the Exchange Online integration can be connected via OAuth authentication. | Every 15 minutes |
| PDF Export | This task performs the bulk export of PDF files in list views. | Every minute |
| Overdue tasks | This background task checks whether there are Tasks whose end date lies in the past and gives them the status “overdue”. | Every 15 minutes |
| Delayed sending | Sends emails marked with the status “Delayed sending”. | Every minute |
2.2. System
| Background task | Description | recommended interval |
|---|---|---|
| Process asynchronous messages | Runs asynchronous actions such as Exchange synchronisation or time-delayed Automations. | Every minute |
| Tasks & Appointments reminder | This background task sends notifications about upcoming tasks and appointments to the responsible user. For this, a reminder must also be configured for a task or appointment. | Every minute |
| Automation: Email scanner | Needed to run the scanning of email accounts configured in Automations. | Every 5 minutes |
| Background Worker | Runs processes and functions relevant to brainX operation in the background. | Every minute |
| Birthday appointments | The background task creates corresponding entries in the Appointments module. The background task is automatically activated when the “Show birthdays” function in the module manager (Appointments module - Basic configuration) is used. | Every day, e.g. at 00:00 |
| SFTP Backup | This background task is needed to have a payload data export created via SFTP. Note The background task cannot be modified directly, but is automatically activated by setting up the SFTP backup. Note The SFTP backup file contains a “How-to-use guide” in PDF format. | Every day, e.g. at 01:00 |
Background tasks in the “System” section cannot be edited directly!
2.3. Integrations
| Background task | Description | recommended interval |
|---|---|---|
| Email Marketing Events | Synchronises the events (subscriptions and unsubscriptions, hard bounces) of all existing Email Marketing accounts. | Every minute |
| Email Marketing Statistics | Synchronises the statistics of all email campaigns of all existing Email Marketing accounts. | 18 times a day |
| Billing - Contract billing [1] | Automatically creates invoices based on contracts. | Every day, e.g. at 01:00 |
| Billing - Contract change interim invoice [1] | Automatically creates interim invoices based on contracts. | Every day, e.g. at 03:00 |
| Jira Service Management customers | Creates or deletes customers in Jira Service Management. The permitted access period can be stored in the respective contact. | Once per hour |
| Sales Viewer | The background task transfers the data determined in SalesViewer via the API (interface) automatically to brainX. In doing so, records are created in the Leads and Website Visits modules. | Once per hour |
| Time tracking | This background task is used to synchronise data between brainX and an external time-tracking service provider. For more information see the section Time tracking. | Every 5 minutes |
[1] Only available in the brainX version “brainX APP”!
3. Activating/deactivating and configuring background tasks
The settings (status active/inactive and the settings) of running background tasks (status = running) cannot be changed.
3.1. Activating a background task
An inactive background task is activated using the toggle in the first column “Status”.
3.2. Deactivating a background task
An active background task is deactivated using the toggle in the first column “Status”.
3.3. Editing a background task
In the last column of the background tasks overview is the “three dots” icon. After clicking it, a flyout menu opens with the actions
- Edit → only available if the background task is generally editable
- Run cronjob now → only available for active background tasks
Background task actions
3.4. Resetting a background task
It can happen that a background task is no longer processed on the server side due to an execution error and remains permanently in an inactive state.
In general, the Technical or Support department of brainX GmbH is automatically notified by the system if a background task has become stuck.
Please contact the Support of brainX GmbH if you have the impression that a background task has been stuck for a longer time or is no longer being run.
For in-house installations, the user CustomerAdmin has the Admin permission level (see the section Users and permissions – Administrative rights), which enables the resetting and restarting of background tasks.
If a background task becomes stuck, this is indicated in the list of background tasks by the “circular arrows” icon. By clicking the icon, the affected background task can be reset or restarted. In addition, the system automatically informs the admin user by email about the affected background task – provided the monitoring email is configured.
4. Further settings
4.1. Background task monitoring email
The “Monitoring email” background task is only available in the brainX variant “InHouse”!
Via the “three dots” action icon in the background task's row, the action “Further settings” can be called up. After clicking the “Further settings” action, the “Further settings” popup window opens.
In the “Cronjob monitoring email” field, an email address can be stored to which the system automatically sends a notification if a background task does not complete as expected. The notification contains details of the affected background task as well as the time of the error.
5. Practical examples
1 – Report scheduling: monthly revenue report for management
The managing director is to automatically receive the previous month's revenue report as a PDF by email on the first working day of each month. In the Reports module, the corresponding report is configured and the sending time is set to the 1st of the month at 07:00. To ensure the sending is reliably triggered, make sure that the Report scheduling background task is active and that an interval of Every hour is set.
2 – Deletion routine: automatically emptying the recycle bin after 30 days
Deleted records should not remain permanently in the recycle bin. In the Recycle Bin module, the retention time is configured to 30 days. The Deletion routine background task is set to a daily interval (e.g. 02:00) and activated. From that point on, records that have been in the recycle bin for more than 30 days are automatically and permanently deleted.
3 – Geodata determination: determining coordinates retroactively after a bulk import
After a CSV import of 500 new organizations with address details, the geodata (coordinates for the map view) should be filled in automatically. The Geodata determination background task is already active and set to Every 5 minutes. Via the Run cronjob now action, the process can be triggered manually without having to wait for the next regular run.
4 – Contract billing: automatically creating monthly invoices
In the brainX APP, subscription contracts are maintained for which an invoice is to be created automatically each month. The Billing - Contract billing background task is activated and configured to run daily at 01:00. From the next run onwards, brainX automatically creates the corresponding invoices for all due contracts.
6. Frequently asked questions
Can I freely enter the execution interval of a background task?
That depends on the respective background task. For most standard tasks, predefined intervals are available for selection (e.g. every minute, every 5 minutes, hourly, daily). For some tasks, a time for the daily run can also be set.
What happens if a background task becomes stuck?
The system automatically notifies the Technical department or the Support of brainX GmbH. For in-house installations, the admin user is additionally informed by email, provided a monitoring email is configured. In the list view, the circular arrows icon appears next to the affected task, via which the task can be reset and restarted.
Why can't background tasks in the “System” section be edited?
System background tasks are controlled internally by the brainX system and are not intended for manual adjustments. Some of them (e.g. SFTP Backup or Birthday appointments) are activated automatically as soon as the corresponding function is set up or activated.
What does the “Run cronjob now” action do?
This action runs the background task immediately – regardless of the configured interval and the next scheduled run time. It is only available for active background tasks and is useful, for example, to avoid having to wait for the regular run after a bulk import or a configuration change.
Can a background task run multiple times simultaneously?
No. As long as a background task is actively running (the Running since column shows a timestamp), it will not be started again – even if the interval elapses in the meantime. Only after the current run is completed is the next run scheduled.