"Create Task" Icon#
The "Create Task" icon is an element of the top control panel in the "Accounts" section, designed to create a task for one or more selected accounts. Clicking it opens the "Create Task" window, where you define the task group, execution parameters, and additional modes before confirming the creation.
Location: The element is accessed via the top control panel of the "Accounts" section.
Available actions:
- specify a task group from existing ones or create a new one
- set the script limit and number of active sessions
- enable retry, shuffle, and wait modes
- configure startup time: now, with a delay, or on a schedule
- select a script and confirm the task creation
Selected accounts list#
The Selected accounts list is displayed at the top of the "Create Task" window as tags with account names. it allows you to verify which accounts the task will be created for before confirming.
If there are more selected accounts than can fit in one row, Afina shows an indicator like "+9", which expands the full list. To return to the compact view, click Collapse.
"Task group" field#
The "Task group" field is intended for linking a new task to an existing group or for creating a new group directly from the window. Clicking the field opens a dropdown list with a search feature.
How to select or create a group:
- Click the Task group field.
- Enter a name in the search field to find an existing group.
- To create a new group, enter at least 3 characters — a hint "Enter at least 3 characters to create a new group" will appear at the bottom of the list.
- Select the desired group from the list or confirm the creation of a new one.
"Script limit (min)" field#
The "Script limit (min)" field sets the maximum execution time of the script in minutes for each account. This is a numerical field that limits the duration of a single execution session.
"Active sessions" field#
The "Active sessions" field determines how many of the selected accounts can be executed in parallel at any given time. This numerical field regulates the load on the system.
"Retry" toggle#
The "Retry" toggle enables automatic repetition of the task if it was stopped due to an error. After activation, a "Number of retries" field appears, where the maximum number of attempts is set.
Enable Retry and enter the desired value in the "Number of retries" field. After the task is created, Afina will automatically restart it upon an error until the specified number of attempts is exhausted.
"Shuffle" toggle#
The "Shuffle" toggle enables randomization of the account order before creating the task. This is useful when you want to avoid the same execution sequence every time.
Enable Shuffle so that Afina automatically changes the order of accounts before starting. Once the task is created, accounts will be processed in a random order.
"Wait" toggle#
The "Wait" toggle enables a mode where the task will not start until the previous task from the same group is completed. This allows you to manage the execution sequence of tasks within a group.
Enable Wait so the task waits for the previous one to finish. After creation, the task will remain in a waiting state until the queue in the group is cleared.
Startup time settings#
Startup time settings allow you to choose one of three modes: "Run now", "Execute in", or "Schedule". By default, the "Run now" mode is active.
How to configure startup time:
- Select a mode: click Run now, Execute in, or Schedule.
- For the "Execute in" mode, enter the delay in minutes in the corresponding field.
- For the "Schedule" mode, click Run in range and specify the "From" and "To" fields for the time range.
- To set a precise time in the "To" field, open the calendar, select the date, set the hour and minutes, choose AM or PM, and click OK.
After selecting the mode and confirming, the task will be started according to the specified schedule.
"Script" field#
The "Script" field is used to select the script that will be executed as part of the task. Clicking it opens a dropdown list with a search among available scripts.
How to select a script:
- Click the Script field.
- Enter the name in the search field to find the desired script.
- Select the script from the results list.
- If needed, toggle Enable.
- Click Add.
"Enable" toggle#
The "Enable" toggle allows the task to start immediately after creation.
Switch on Enable so the task starts right after creation. If you want to activate this task at another time, leave the toggle switched off.
Workflow Scenario#
Step 1: Select accounts
On the "Accounts" page, mark the required accounts with checkboxes. Ensure at least one account is selected.
Step 2: Open the task window
Click the "Set task" icon in the top control panel. The "Create Task" window will open with a list of selected accounts.
Step 3: Specify task group
Click the "Task group" field and select an existing group or enter at least 3 characters to create a new one.
Step 4: Set parameters
Enter values in the "Script limit (min)" and "Active sessions" fields. If necessary, enable the "Retry", "Shuffle", or "Wait" toggles.
Step 5: Configure startup time
Select the startup mode: "Run now", "Execute in", or "Schedule". For a schedule, specify the "From" and "To" range.
Step 6: Select script
Open the "Script" field, find the required script via search, and select it from the list. Toggle "Enable" if needed.
Step 7: Enable the task
Click the toggle so the task starts immediately after creation.
Step 8: Confirm creation
Click "Add". Afina will show a green message confirming successful task creation, and it will appear in the "Active Tasks" section.