Tasks
In uContact, you can create tasks to automate actions such as executing database queries, exporting information to an external server or email, running commands, among others.
How to Create a Task?
Creating a task in uContact is straightforward. Here's how you can do it step by step:
- Go to the Administrator menu, then to the Automations module, and select Tasks.
Within Tasks, click on the "New" button located in the upper right corner.
A pop-up will appear with two tabs where you need to complete the required information to create the task.
Basic
In the Basic tab, enter the essential information for the task:
- Name: This is the descriptive name of the task.
- Type: Select the type of task, which can be:
- SQL Query: Allows executing queries to the database.
- Shell Script: Allows executing commands on the server.
- Export: Allows exporting information from the server.
- Timezone: Select the timezone that will be used to define the task's execution schedule.
- Enabled: Activate or deactivate the automatic execution of the task.
Schedule
In the Schedule tab, configure the frequency of task execution. You can define the frequency using the fields for minutes, hours, days of the month, months, and days of the week. It's not mandatory to fill in all fields; you can combine them according to your specific needs.
Minutes
- Every minute: The task will run every minute.
- Every x minutes: Allows selecting a specific interval in minutes.
- Select minutes: You can choose specific minutes for the task's execution.
Hours
- Every hour: The task will run every hour.
- Every x hours: Allows selecting a specific interval in hours.
- Select hours: You can choose specific hours for the task's execution.
Days of the Month
- Every day: The task will run daily at a specific hour.
- Every x days: Allows selecting a specific interval in days.
- Select days: You can choose specific days of the month for the task's execution.
Months
- Every month: The task will run monthly.
- Every x months: Allows selecting a specific interval in months.
- Select months: You can choose specific months for the task's execution.
Days of the Week
- Every day of the week: The task will run every day of the week.
- **Every x days
of the week:** Allows selecting a specific interval in days of the week.
- Select days of the week: You can choose specific days of the week for the task's execution.
Configuration Verification
To verify if the configured frequency is correct, as you make changes, you'll see a cron expression and a detailed description of the task's execution frequency. For example, "The task will run every day at 12:00."
Examples of Execution Frequencies
Here are some examples of task configurations for you to try:
Task to run every day at 00:00
- Minutes: 00
- Hours: 00
- Days of the month: Every day
- Months: Every month
- Days of the week: Every day
Cron expression: 0 0 * * *
Description: The task will run every day at 00:00.
Task to run every hour every Monday
- Minutes: 00
- Hours: Every hour
- Days of the month: Every day
- Months: Every month
- Days of the week: Monday
Cron expression: 0 * * * 1
Description: The task will run every hour every Monday.
Task to run on the 1st day of every month at 09:00
- Minutes: 00
- Hours: 09
- Days of the month: 1
- Months: Every month
- Days of the week: Every day
Cron expression: 0 9 1 * *
Description: The task will run on the 1st day of every month at 09:00.
With these steps and examples, you can configure and create tasks in uContact according to your specific automation needs.