Background Tasks
Package: BASIC
1. General
With scheduled background tasks (cronjobs), actions can be executed 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. The reports are sent as attachments – in PDF, CSV or both formats, depending on the configuration.
Example: On the 1st of each month, the managing director receives the current status of the previous month's revenue.
1.1. Overview of Background Tasks
In the settings item "Global Settings - System Automation - Background Tasks", an overview of the background tasks is displayed, in which they can also be configured:
System Automation - Background Tasks
The background tasks are thematically divided into three areas (see screenshots above):
1.2. Column Headers
Each thematic area of the background tasks has a tabular overview with the following table headers:
- Status → Display of whether the background task is active/inactive. Using the toggle, the background task can be activated (toggle to the right, toggle color orange) or deactivated (toggle to the left, toggle color gray).
- Name → Name of the background task. On mouseover, a brief description of this background task is displayed.
- Defined Interval → Display of the defined interval in which the background task is executed.
- Last Execution → Display of date and time when the background task was last executed.
- Next Execution → Display of date and time when the background task will be executed next.
- Running Since → If a background task is currently running, the time since which it has been executing is displayed.
- 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 → Clicking the icon "three dots" displays the available actions of the respective background task.
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 times. The reports are sent as PDF, CSV or PowerPoint files (for report sets) as attachments. | Every hour |
| CSV Update | This background task controls the intervals at which available CSV update definitions are searched for and then processed. | Every hour |
| CSV/ICS Import | This background task controls the intervals at which available CSV import definitions are searched for and then processed. | Every hour |
| Exchange Online | The background task is needed to maintain user authentications between the brainX system and an Exchange Server. Furthermore, any interrupted synchronizations can be resumed and completed. | Every 30 minutes |
| Geodata Retrieval | The background task regulates the interval in which the geodata of new records are determined. | Every 5 minutes |
| Deletion Routine | The background task automatically deletes records in the Trash module at the defined time interval. | Every day |
| OAuth refresh | The background task ensures that existing OAuth authentications of email mailboxes do not expire. Email mailboxes, the central mail server, and the Exchange Online integration can be connected via OAuth authentication. | Every 15 minutes |
| PDF Export | This task executes the mass export of PDF files in list views. | Every minute |
| Overdue Tasks | This background task checks whether there are tasks whose end date is in the past and assigns these 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 | Executes asynchronous actions such as Exchange synchronization or time-delayed automations. | Every minute |
| Task & Appointment Reminders | 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 | Required to execute the scanning of mailboxes configured in automations. | Every 5 minutes |
| Background Worker | Executes 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 is used in the module manager (Module Appointments - Basic Configuration). | Every day e.g. at 00:00 |
| SFTP Backup | This background task is needed to create a user data export via SFTP. Note The background task cannot be directly modified, 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 directly edited!
2.3. Integrations
| Background Task | Description | Recommended Interval |
|---|---|---|
| Email Marketing Events | Synchronizes the events (subscriptions and unsubscriptions, hard bounces) of all existing email marketing accounts. | Every minute |
| Email Marketing Statistics | Synchronizes the statistics of all email campaigns of all existing email marketing accounts. | 18 times per day |
| Billing - Contract Invoicing [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 allowed access period can be stored in the respective contact. | Once per hour |
| Sales Viewer | The background task automatically transfers the data determined by SalesViewer to brainX via the API interface. Records are created in the Leads and Website Visits modules. | Once per hour |
| Time Tracking | This background task serves to synchronize data between brainX and an external service provider for time tracking. Further information see 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. Activate Background Task
An inactive background task is activated using the toggle in the first column "Status".
3.2. Deactivate Background Task
An active background task is deactivated using the toggle in the first column "Status".
3.3. Edit Background Task
In the last column of the background tasks overview, there is the icon "three dots". 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. Reset Background Task
It can happen that a background task is no longer processed server-side due to an execution error and remains permanently in an inactive state.
In general, the Technical/Support department of brainX GmbH is automatically notified by the system if a background task has become stuck.
Please contact brainX GmbH support if you have the impression that a background task has been stuck for a longer time or is no longer being executed.
For InHouse installations, the CustomerAdmin user has the Admin rights level (see section Users and Permissions – Administrative Rights), which enables resetting and restarting of background tasks.
If a background task becomes stuck, this is indicated in the list of background tasks by the icon "circular arrows". By clicking the icon, the affected background task can be reset or restarted. Additionally, the system automatically informs the admin user by email about the affected background task – provided that the monitoring email is configured.
4. Further Settings
4.1. Background Task Monitoring Email
The background task "Monitoring Email" is only available in the brainX variant "InHouse"!
The action "Further Settings" is accessible via the action icon "three dots" in the row of the background task. After clicking the action "Further Settings", the popup window "Further Settings" opens.
In the field "Cronjob Monitoring Email", an email address can be stored to which the system automatically sends a notification when a background task is not completed as expected. The notification contains information about the affected background task and the time of the error.
5. Practical Examples
1 – Report Scheduling: Monthly revenue report for management
The managing director should 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 report is configured and the send time is set to the 1st of the month at 07:00. To ensure the dispatch is triggered reliably, the background task Report Scheduling must be active and set to an interval of Every Hour.
2 – Deletion Routine: Automatically empty the recycle bin after 30 days
Deleted records should not remain in the recycle bin indefinitely. In the Recycle Bin module, the retention period is configured to 30 days. The background task Deletion Routine 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 Retrieval: Determine coordinates after a mass import
After a CSV import of 500 new organizations with address data, the geodata (coordinates for the map view) should be populated automatically. The background task Geodata Retrieval is already active and set to Every 5 Minutes. The action Run Cronjob Now can be used to trigger the process manually without waiting for the next scheduled run.
4 – Contract Billing: Automatically create monthly invoices
In brainX APP, subscription contracts are maintained for which an invoice should be created automatically each month. The background task Billing - Contract Billing 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 enter the execution interval of a background task freely?
This depends on the individual background task. For most standard tasks, predefined intervals are available (e.g. every minute, every 5 minutes, hourly, daily). For some tasks, a specific time for the daily run can also be configured.
What happens when a background task gets stuck?
The system automatically notifies the brainX GmbH support team. For InHouse installations, the admin user is additionally notified by email, provided a monitoring email address is configured. In the list view, the affected task displays the circular arrows icon, which can be used to reset and restart the task.
Why can't background tasks in the "System" section be edited?
System background tasks are managed internally by brainX and are not intended for manual adjustments. Some of them (e.g. SFTP Backup or Birthday Appointments) are activated automatically once the corresponding function is set up or enabled.
What does the "Run Cronjob Now" action do?
This action executes the background task immediately — regardless of the configured interval and the next scheduled execution time. It is only available for active background tasks and is useful for triggering a run right after a mass import or configuration change without waiting for the regular schedule.
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. The next execution is only scheduled after the current run has completed.