0:06 Welcome to this IT Explainer video, part of our maintenance topic range.
0:10 In this video, we’ll cover the subject of the Background Task Manager within SLMA.
0:16 Background Task Manager is a component or service designed to schedule and execute tasks automatically at specific intervals or times.
0:24 These tasks, often referred to as background tasks or jobs, run independently of user interactions, allowing the application to perform regular maintenance, updates, data processing, and other repetitive functions without manual intervention.
0:39 The following information will be covered in this training.
0:41 Chapter one will be task manager configuration in Linux.
0:45 Chapter 2 will be task manager configuration in Windows.
0:49 Chapter 3 will be managing task schedules, Chapter 4 will be the background queue monitor, and Chapter 5 will be resetting the background queue.
1:01 In chapter one, we’ll be covering how to configure the task scheduler in Linux and how to restart the task scheduler in Linux.
1:11 The task scheduler in Linux is managed by the Chrome service, which uses a Chrome tab file for configuration.
1:18 The file format includes the following elements in order, minutes, hours, days, month, day of the week, username, and then the command to be executed.
1:39 For SLM, we have a task configured to run every minute.
1:43 As you can see, in order to run on every minute, we have to place an* on the minute position, which means on every minute of every hour of every day, every month.
1:58 The user root will execute the following script PHP that will receive the index PHP file located under the web root folder and it will execute the method CLI located in the QA controller.
2:14 This method analysis the SLMQ and checks for tasks that need to be executed.
2:21 Now let’s go over the machine for our instance SLM gold.
2:25 The way that we stop this service is with the following command, ETC.
2:30 Init dot D Chrome stop.
2:33 If we want to start the service, just type start at the end.
2:43 If we’d like to stop and restart the service in a single command, we can use reload.
2:55 In Chapter 2, we’ll be covering how to configure the scheduler in Windows and how to restart the scheduler in Windows.
3:03 In Windows, the SLM background task is executed by the Windows Task Scheduler.
3:09 Let’s go ahead and configure the task.
3:12 In order to do that, we need to click Create Task.
3:16 We’re going to assign a name SLM Task Scheduler.
3:23 We need to select which user is going to run this task.
3:27 Let’s type System, click Check Names and click OK Let’s click the check box to run with the highest privileges.
3:38 Now let’s click the Triggers tab.
3:41 The trigger will allow us to specify how often the task is going to be run, so the settings we’re going to use is one time on the moment we create the task.
3:50 We’re going to repeat the task every minute and for a duration of indefinitely.
4:01 Let’s make sure that Enabled is checked and click OK.
4:06 We’ll leave the rest of the options with their default values.
4:10 Now that we have a name for task and how often it’s going to be triggered, let’s go to the Actions tab.
4:15 Let’s click New.
4:18 When this task is executed, it’s going to start a program.
4:22 In our case, it’s going to be PHP, so let’s search for where PHP is installed.
4:30 Let’s click that file and click Open.
4:35 As part of the argument, we need to specify the file that PHP will receive as an input and the controller and the method that’s going to be running on every minute.
4:44 The file will be the index dot PHP which is located under the web root folder for our code base.
4:51 So let’s copy that path and the controller that’s going to execute will be core slash cure and the method CLI.
5:09 Let’s click OK under conditions.
5:15 Let’s uncheck this box.
5:17 Start the task only if the computer is on AC power.
5:20 We want to start the task regardless.
5:23 Let’s go to settings.
5:26 We’ll leave all of these options as default except this very last one, which we’re going to change to.
5:33 If the task is already running, then the following rules apply.
5:36 Run a new instance in parallel.
5:39 Let’s click OK and we can see the task has been created.
5:45 Here on the right side panel we have some options.
5:50 We can end the task if the task was running at the time.
5:56 We can disable the task to completely stop the task so the task scheduler will not run every minute.
6:02 If we want to start that again, we can click on Enable and then to execute the task, we can click on Run and we can see that the status has changed to Running.
6:18 In Chapter 3, we’ll be covering the processes that are run automatically by SLM in the Task Scheduler.
6:25 SLM features a series of tasks that are automatically carried out by the Task scheduler.
6:30 These tasks can be found in the System module and the background task Manager and Manage task schedules.
6:37 These background processes handle maintenance activities, usually scheduled for midnight or early morning to minimise disruption to the users.
6:45 Automatic tasks include destroying idle accounts, system clean UPS, updating test groups, managing notification agent amongst others.
6:56 System administrators can run these tasks on demand by clicking the Run Task button or edit the tasks by hitting the Edit button.
7:04 In here, we can modify the name and the execution order.
7:12 In Chapter 4, we’ll be covering where users can check the tasks that are currently in the SLM queue and their statuses.
7:20 The Background Queue Monitor enables users to track the status of background tasks and processes executed by SLM.
7:27 In the system module, system administrators can find the Background Queue monitor under Background Task Manager and Background Queue Monitor.
7:36 In here, system administrators can view pending and running and completed tasks.
7:41 For completed tasks, details such as the status, description, schedule date, modified channel, and task information is available.
7:51 Regular users can also monitor pending and running tasks within their user modules.
7:56 We go to Instrumented Systems.
7:59 A regular user can keep track of these tasks by clicking on the background task icon located in the top toolbar.
8:09 In Chapter 5, we’ll be covering how to reset the background task queue.
8:14 Occasionally, a background task may stop or remain idle due to code or network issues.
8:20 When this occurs, it prevents the execution of subsequent background tasks.
8:24 To resolve this issue and ensure other tasks can proceed, admin users can use the Reset Queue feature to clear the idle tasks.
8:32 The Reset Queue feature is found in the System module in the Background Task Manager Reset Queue.
8:39 Let’s hit the Execute button to clear this idle task.
8:42 As we can see, the idle task that was stuck in processing has now been removed.
8:47 We’re now just waiting for our last task to be executed, and that last task has now been executed at this point.