CRON scheduler - launches programs on a schedule. What you need to start and stop programs on a schedule

xStarter automates everyday tasks based on scheduler or system events.

Key Benefits

Reduce your working hours by 35%.

By creating macros for your daily tasks, you free yourself from routine. And the computer can run these macros using xStarter even in your absence according to a schedule.

Take care of the safety of your data.

If automatically backing up your documents and email requires little to no effort, then why not do it?

Replacement for Windows scheduler.

The xStarter advanced scheduler will allow you to more accurately specify the moment to start a program or complete a task. Tasks can be run exactly at a specified time, periodically, or in a complex format. When xStarter is running in NT service mode, it is possible to launch tasks even in the absence of active users.

Track changes to files and directories.

As soon as a new file appears in the specified directory, the xStarter program will notify you about it or perform any action. In the same way, xStarter tracks changes and deletions of files and directories, including changes to subdirectories.

Actions on the Internet.

Sending and receiving email, working with files via FTP and HTTP - this is just a short list of what you can automate when working with the Internet. For example: receive daily reports and save them to the specified directory; send notifications about completed tasks without user assistance; download log and other files, etc.

Windows macros.

You can record macros while working in any program and with any object in the Microsoft Windows environment using xStarter. Each macro is a file that contains a sequence of recorded movements, mouse clicks, and keyboard button presses. This file can be played at any time using a schedule or hotkey, as if you were performing these actions yourself.

Remote control.

With xStarter Web Pilot, it becomes possible to run tasks on remote computers, view tasks and their logs, and disable/enable them.

Compiling tasks.

You can create .exe files from xStarter tasks and transfer tasks between computers. When running tasks, users can fill in some parameters specific to a given user or computer.

Firebird/Interbase.

A special version of xStarter Job Scheduler for Firebird/Interbase allows you to perform specific tasks for specified database servers. With this version you can run SQL scripts, backup/restore databases, etc.

Automate tasks without programming skills.

Each xStarter task consists of a set of actions. Actions are aimed at performing various functions, here are just a few of them:

  • launching programs;
  • displaying messages on the screen;
  • Internet connection;
  • directory synchronization;
  • window operations;
  • operations with text and log files;
  • disabling and connecting network directories;
  • etc.

Tasks can be executed according to a schedule, hotkeys or system events.

System requirements

Intel Pentium or compatible processor
Windows NT4/2000/XP/2003/Vista


The first thing you should pay attention to even before creating tasks is whether the service is running " Task Scheduler" This service may have been disabled when system services were configured to free memory while in use. Task Scheduler there was no need. Now, if scheduled tasks will be executed regularly, then this service must be switched to automatic launch mode. To make sure that the service is running, run Start — Execute — services.msc. The window shown below will open:

Find the "Task Scheduler" service and make sure that in the field State she has Works, and in the field Startup type — Auto. If this is not the case, then double-click on the service name and in the window that opens, adjust the values ​​to those indicated above (for this you need to have administrator privileges, i.e. your account must be from the group Administrators).

Once the service is started and its startup type is set to automatic, the service will start at system boot and jobs will run as scheduled.

Now let's create a task.

Open Control Panel and click on Assigned Tasks. The following window will open:

To create a new task, click on Add task.

In this window you need to select the program that will be launched . As a rule, the desired program is not in this list and must be found using the button Review. For example, I created a Scheduler folder on drive C and placed the test.bat batch file in it, which contains a sequence of commands that need to be run at a certain time. Pressing the button Review find the file that will run and press Open. If everything is done correctly, the New Job Wizard will display the following window:

In field Name you need to specify the name of this task, which will be displayed in the window . The name can be anything. Give the task a name so that later, when you open it, , you could immediately remember what this task does. In this example, I named the task “ Testing the Scheduler».

Then you need to select the start period for this task. The following options are possible:

  • . The task will run daily, either only on weekdays, or every few days at the specified time. All these parameters can be selected in the next window, which will be discussed below.
  • . In the next window, you can specify whether the task should be run every week and select the days of the week on which the task will be launched at a certain time.
  • . Next, you can specify in which months of the year the task should be launched and select on which days of the month or on which days of the month at a certain time the task will be launched.
  • . In the next wizard window, you can select the date and time to start the task. This task will no longer be performed.
  • When the computer boots. There is no next window when choosing this option, which is logical, because... With this type of startup, the task will be executed every time the computer boots. This type of launch does not require user login; the task will be launched on behalf of the user that will need to be specified in the next window.
  • When logging into Windows. This type of startup is similar to the previous one with the difference that the task will only be executed when the user logs into Windows, i.e. will enter your username and password.

Now let's look at these types of task launches in more detail. After pressing the button Further A window will be displayed in which you need to specify additional schedule parameters for running the task. The exception is the last two types of startup, when the task is executed when the computer boots or when the user logs in. So, enter the task name and select one of the startup types, then click the button Further. Depending on what type of launch was selected, certain settings for the task launch schedule will be offered.


With the daily launch type, you can choose whether to run the task daily, or run it only on weekdays (naturally, holidays in the week are considered working days, the task runs from Monday to Friday, inclusive), or run the task periodically, for example, one once every three days. In the same window you need to select the start time for the task. " start date» will allow you to postpone the first launch of the task until a certain date, i.e. if today is the first day of the month, and “ start date" is set to the 10th, then the task will start running on the tenth, despite the fact that it is scheduled to run daily.


With the weekly launch type, it is possible to launch a task on certain days of the week by checking the corresponding days of the week in the window shown above in the picture. You can specify that the task should be executed every other week, i.e., for example, the first week on Monday, Wednesday and Friday, the second week the task is not executed, the third is executed on Monday, Wednesday, Friday, the fourth is not executed, etc. Also, you need to specify the time at which the task will be executed on the specified days of the week.


If the job is launched on a monthly basis, you must mark the months in which the job will be launched and indicate the date when the job will be launched. Please note that the last day of the month can be the 28th, 29th, 30th or 31st, so if the task needs to be completed at the end of the month, then it is better to schedule it to run on the first of the next month at 00: 01. If there is a need not to specify a specific date for running a task, but to run it only, for example, on the third Fridays of specified months, then you can toggle the corresponding switch and select the required values ​​from the list boxes.


If you select to run the job once, you only need to specify the date and time it will run. The task will be launched at the specified time, and after that it will not be launched again. Assignment from will not be deleted, so it can be used in the future by correcting the start date and time. This type of task launch is well suited for non-periodic execution of tasks while the user is away from the computer.

When the computer boots

As mentioned above, with this type of startup, the task will be executed every time the computer boots, until the user logs in.

When logging into Windows

This task will be executed when the user logs in.

Select the schedule that best suits your startup frequency requirements, even if it does not fully correspond to what is needed. For example, if a task needs to be executed on weekdays at 21:00, and on weekends at 19:00, then at this stage of task creation you should select to run the task weekly, and after creating it, adjust the schedule as necessary. An example of such a setting is shown in the figure below.

After the initial schedule is set, click the button Further. An example of the window that opens is shown in the figure below.

In this window you must enter the name and password under which the task will be launched. By default, the username is the current username. Be careful when entering your password, because... it is hidden by “stars”. If the password is very complex, then it is better to type it in any text editor (for example, Notebook) and copy into the appropriate fields. If an error is made when entering the password, no message about this will be displayed, but the task will not be executed. Also, keep in mind that in Windows XP it is not acceptable to use a blank password, although a user account can have a blank password. A blank password will also cause the job to fail. To fix this in Windows XP, give the account a password and enter it into the task you create.

The scheduled task will run under the username that was entered. Those. possible from a user with limited rights (group Users) run tasks on behalf of an account without restricting rights (group Administrators). To do this, when creating a task, instead of the suggested name of the current user, enter the name of a user with administrative rights (user included in the group Administrators). This will lead to the fact that when completing a task, the program will be able to access those functions and files that a regular user does not have access to.

Another thing that is easy to forget and will result in scheduled tasks not being completed is changing the user password, the one you need to enter to log into Windows. If the password is changed, you will have to change it for all assigned tasks, which is very inconvenient, but increases security.

Once the username and password are entered, click the button Further.

If the launch schedule fully satisfies the requirements, then after pressing the button Ready, in the window shown in the figure below, the creation will be completed and in the window Assigned Tasks V Control panels The newly created task will appear. If the task launch schedule requires further, more fine-tuning, then check the “ " and press the button Ready. In this case, a window will open to configure additional options for scheduling the task.

If there is a need to configure additional parameters for a scheduled task, then right-click on the created task in the folder Assigned Tasks located in Control panels and select Properties. If additional settings will change immediately after creating a task, then in the last window when creating a task (the figure in the previous chapter) you need to check the box “ Set additional options...» and press Ready. Any of these sequences of actions will cause such a window to open.

This window contains three tabs with parameters for fine-tuning the task launch schedule. All settings located on them will be discussed in detail below.

On the first tab Exercise, the appearance of which is shown in the figure at the very beginning of the article, contains basic information about the scheduled task. This:

  • Path to the file in which the task settings are saved. In the picture this path is C:WINNTTasksTesting Scheduler.job
  • In field Execute the path to the program that runs on a schedule is specified. In this example it is C:Scheduler est.bat
  • Button Review allows you to change the path to the program to be launched (if the program file has been moved) or select another program. The same can be done manually by entering the path and name of the executable file in the field Execute located above the button Review.
  • Next field Work folder contains the path to the folder where the program that is scheduled to run stores its files and creates work reports, if the path to the reports is not specified in the program itself. Using the value of this field, you can redirect reporting to a folder other than C:Scheduler, as in the example.
  • Text field A comment allows you to store a description of the task being launched. This is convenient when several people are working on the computer, so that there is no need to understand what the task was created for.
  • Next field User contains the name of the user under whose name the task will be launched. This meaning was discussed in detail at the end of the previous chapter.
  • Button Set a password is intended to change the password if the username in the corresponding field has been changed. There is no practical use from this button, because... When you try to save changes to a task (including the username), you will be prompted for a password.
  • Jackdaw Included... serves to enable or disable jobs. Removing it will cause the task to be stored in the folder Assigned Tasks, but will not be executed. This is useful when a task runs from time to time according to a complex schedule. Disabling a job temporarily helps avoid having to delete it and create it again when you need to run it again.

Appearance of the next tab :

This tab provides all the options for managing the launch schedule of a scheduled task, which are much broader than those that could be configured in the task creation wizard and discussed in the previous chapter. Let's look at all the settings in order:

  • At the top of the tab, the current schedule for the scheduled task is displayed.
  • In a combo box Assign a task You can change the launch schedule type. All types were discussed in the previous chapter, so we will not dwell on them.
  • Field Start time contains the time at which the task will be launched.
  • Button opens the window shown below.

This window has several additional schedule settings that are worth mentioning separately.

  • start date. Allows you to specify the date for the first start of the task, after which the task will be executed with the specified schedule. This field may be required when the task should be started on a specific date, and not immediately after creation.
  • expiration date. This field allows you to specify the date the job was last executed. After the date specified in this field, the task will not be executed. To be able to specify the end date, you need to check the appropriate box.
  • Field group Repeat task. If you check the box of the same name, you will be able to configure the task startup interval. For example, you can run a task every 30 minutes for 8 hours or until a certain time. A very convenient option for solving certain event monitoring problems. For example, sometimes you need to check for the presence of a file in a certain folder every five minutes during the working day, and if it appears there, then run a script that will perform certain actions on the file.

    Jackdaw Stop jobs It is designed to complete a running task when its execution time has expired. For example, in the field Run until The time indicated is 18:00. If the job is very large and takes half an hour to complete, then starting it at 17:55 will cause the job to actually run until 18:25. If this state of affairs is undesirable, then you need to check the box Stop job. In this case, the task will be terminated at 18:00, no matter what.

  • The next group of settings relates to the selected task launch type, and is different for each launch type. All types of their settings were discussed in the previous chapter.
  • Jackdaw opens up the widest possibilities for flexible scheduling for one task. If you check it, a combo box appears at the top of the tab, which lists all the schedules and buttons created for the task. Create And Delete for managing schedules.

    Creating several schedules can satisfy almost any desire for time and frequency of task launch. For example, you can configure a task so that it runs on Monday at 19:00 every 10 minutes for 2 hours, on Tuesday at 20:00 every 30 minutes for an hour, on Wednesday at 14:00 every 5 minutes until 20:00, etc. As is already becoming clear, to implement such fine-tuning of the task launch, you need to create a schedule using the button Create. Each schedule you create is added to the combo box at the top of the tab. To configure or delete one of the schedules, you need to select it from the list and then either configure it as described above, or delete it using the corresponding button.

To illustrate the steps described, I created a schedule that would run the task on weekdays at 21:00 and on weekends at 9:00. For this I created two schedules:

Last third tab , shown below, contains additional task settings.

  • Jackdaw Delete task, if there is no scheduled repetition, is intended to remove “one-time” tasks from the folder Assigned Tasks V Control panels. Checking this box will result in the task being deleted if its launch schedule does not include subsequent runs.
  • Field Do it no longer than allows you to specify the maximum time for a task to complete. You can force the execution to stop if the job takes longer than the specified time.
  • Settings group Time Idle time allows you to run a task only if the computer has been idle for some time. Useful for planning the launch of resource-intensive tasks that take up all the processor time during their execution, loading it at 100%.
  • The first two jackdaws in the group Power management allow you to specify whether to run a scheduled task on a laptop if it is running on batteries. The last, third checkbox allows you to “wake up” the computer when it is in standby mode (low power consumption mode, when almost all computer devices are turned off, but it is turned on and restores its operation when exiting standby mode within a couple of seconds, and all applications that are open at the time of entering standby mode are not terminated and also wait for the computer to exit standby mode).

To save all changes made, click the button OK, after which you will be prompted to enter a password for the user whose name is indicated on the first tab.

Be careful when entering your password. If the password is entered incorrectly in both fields, then no warning about this will be issued, and the scheduled task will not start at the specified time.

The next chapter provides examples of the most common schedules for running jobs using .

Now let's look at several options for scheduling the configured task. All schedules run the test.bat file from C:Scheduler. I first created the task using the wizard, and then in the window right-clicked on it and selected Properties.

On the first tab Exercise I have not made any changes, so she will not participate in the description of the schedules. Last tab will also not appear in the examples, with the exception of one, “one-time” task. List of scheduling options discussed below:

Daily task launch

The first configuration example shows how to configure a task to run daily at 21:00. The simplest version of the schedule, which is created by a wizard without further configuration. Tab V Properties The created task looks like this:

This schedule, in my opinion, does not require any additional comments. The task runs every day at 21:00.

Running a task every other day

This schedule differs from the previous one only in that it runs once every two days.

As you can see in the screenshot, in the field by day the value is set to Every 2nd day. This will cause the task to run once every two days. You can enter any value in this field.

Delayed daily task launch

In this example, the task is scheduled to run daily, but its first run is delayed by 10 days.

As can be seen, in Additional settings The start date of the task is set to the 17th, despite the fact that the task was created on the 6th. Thus, we created a task, but delayed the start of its daily launch by 10 days.

Running a task daily until a certain date and then deleting the task from

With this schedule, the task runs daily until a certain date. When the last run date is reached, the task is removed from .

This schedule runs the task every day, starting on the 7th and ending on the 15th, as they say shown in the figure above. On the tab Settings it shows that the checkbox is checked Delete task. Setting this checkbox will cause the task, after the last run, to be deleted from .

Running a task on different days of the week at different times

This example demonstrates setting up a task launch schedule on different days of the week at different times.

Using this schedule, the following task was implemented. The task starts on weekdays at 21:00, and on weekends at 9:00. On the tab the checkbox was checked Show multiple schedules, then the workdays were checked and the task launch time was set at 21:00. Then, using the Create button, a second schedule was created, its launch type was changed to and checked the boxes for weekends. Now on different days the task will be launched at different times.

You can create more schedules to fine-tune when a task runs on different days, up to and including creating seven schedules to configure a schedule to run a task at a different time on each day of the week.

Run a task every minute during business hours on weekdays

This schedule runs a task every minute during the workday and only on weekdays. Such a schedule will be useful for checking from a script whether a file is present in a certain folder. For example, every day, at different times, branches upload reports on the work done for the previous day to FTP at the central office, which should be automatically unzipped and imported by script into the corporate database. The scheduler runs a script that checks whether the file appears in the specified folder; if it does, it performs the necessary actions with it, and if the file does not exist, the script ends.

The schedule starts every working day at 8:00. IN Additional settings it states that the task runs again and again every minute until 19:00. Thus, the maximum delay in processing a file that appears in a folder will be seconds.

Monthly task launch

This example shows how to configure a task to run once a month. As a rule, such frequency is needed to run scripts that analyze the logs for the past month, create statistics and place the logs in the archive.

The task is scheduled to run on the first minute of the new month. This is because a month can have 28, 29, 30 or 31 days. In order not to create your own schedule for each month, it is more logical to complete the task on the first day of each month.

Schedules built on these examples will be able to run the task exactly at the time, as often and on the days when it is required to solve the task. Settings so flexible that you can create as complex a schedule as you like. Usage allows you to refuse to use utilities that may be unstable, will take up part of the system resources, or will not have the required flexibility of settings.

In the next chapter, I'll briefly talk about how to test the job you've created to make sure it goes off without a hitch the first time you run it.

It’s not enough to create a task and write a program or script that will run . It is necessary to perform a test run of the task to make sure that the task works exactly as planned and that there are no problems when running it. This is quite easy to do.

Right click on the created task in and select Execute. The task will be started immediately, regardless of the schedule.

The most common errors when creating a task, which lead to the task not starting at the specified time or to failure during a test run of the task: incorrectly entered password. Just as often, you may encounter that a task does not start due to an empty account password. Windows 2000, unlike Windows XP, will run the task under an account with an empty password. In XP, the task will not be launched. The solution to this problem is to set a password for the account and specify it in the task settings.

Another error may be caused by the fact that the path to the program or script that the task runs is incorrect. Including, if there are spaces in the path to the program or script to be launched, then the path must be enclosed in quotes.

Another problem with running a scheduled task can be caused by a service not running . Please note that if there are scheduled tasks, then the service startup mode Task Scheduler it should be Auto. If the service startup mode Manually, then the task creation wizard will start without problems, because Windows will automatically launch the required service when you open the wizard, and after rebooting the service will remain unstarted and the task will not be executed. How to check and set the service startup mode Task Scheduler V Auto, was described above.

If the test run of the task is successful, in the main window , in the column Past result the value 0x0 will appear. This indicates that the task launch was successful. If the task launch failed for some reason, then in the column State it will be written " Launch failed" To find out why the task did not start, open the work log .

The picture shows the menu Additional Scheduler. To open the work log, select the bottom menu item View log. An example of the error logged is shown below. "Testing Scheduler.job" (test.bat) 03/14/2004 20:51:20 ** ERROR ** An attempt to use the job account failed, so the job was not executed. Specific error: 0x8007052e: Login failed: username or password not recognized. Please check that your username and password are correct and try again.

To get the specified error, I specifically entered the wrong user password in the task and ran it using the command Execute as discussed above.

So using the work log will help you quickly eliminate the reason for the task not starting.

The work log is located in the file SchedLgU.Txt, which is located in the systemroot, i.e. in the folder where Windows is installed. The encoding of this file is Unicode.

Count Scheduler State may contain values ​​explained in the table below.

Successful test runs of a task do not replace the need for constant monitoring of task execution. Having put the task into “combat” operation, do not forget to periodically review the log and . A more reasonable solution is to create a log file of the task itself and open this log upon completion of its work. For example, when you come to work in the morning, you will see an open editor window with a log file. This will force you to involuntarily view the result of the task, and the absence of an open window will mean problems that arose either when starting the task or during its execution. This will allow you to quickly fix the problem.

Often there is a need to automatically perform certain actions on user computers on a local network. Administrator can manage tasks on user computers remotely over the network. The account from which tasks will be managed must have rights Administrator on the user's computer.

To create, edit or delete a task on the user’s computer over the network, open via network his computer.

Among other shared resources on the user's computer there are Assigned Tasks. Open this folder. An example window is shown in the following figure.

To create a new task on the user's computer, right-click and select from the menu Create Scheduled Task, as shown in the figure above. After this, a new one will be created on the user’s computer. empty exercise. The wizard will not be launched, because the job is created over the network, not locally. After entering the name of the new task, you need to configure its properties. This can be done in the window that opens by right-clicking on a new task when selecting a menu item Properties.

When setting up a job, remember that the job is being configured remotely, not locally.

All parameters of a task that is configured remotely are identical to the settings of a local task, and were described above.

Windows XP and older have a command line utility called schtasks that allows you to manage scheduled tasks on computers on your local network. This utility will be indispensable for managing tasks from scripts. Help about the keys to run this utility can be obtained by typing in the command line

Greetings, dear readers and subscribers of the blog site, today I would like to talk about a tool that allows you to automate routine processes and launch programs automatically without user action. Surely everyone has come across routine processes that need to be performed day after day or at some other frequency and have wondered how to optimize this process. Today I will try to answer your question and demonstrate how you can implement automatic launch of programs on a schedule, automating the same type of tasks performed on the computer, thereby you can save additional time for yourself and do any business, the program will do everything for you.

The Windows 7 operating system has a standard scheduler that allows you to run programs at a given time, but there are no additional features that require you to make changes to the program itself before execution, then I was faced with the question of what tools can be used to implement this task. Having entered the first query that came to mind in the search engine, I came across the xstarter program, I tried to implement the actions that I needed using this program by recording macros, but after recording the macro, I was unable to reproduce it. Having tried to record several times with different parameters, I still did not achieve my original goal, so I finally gave up on implementing the task using the xstarter program.

I constantly communicate with smart people, whom I help in some way and in return I sometimes receive something from them, somehow it comes out naturally. So here, after talking with a recent acquaintance from Ukraine, I casually heard from him the words “ The macro started executing the program again". Then it clicked in my head and, remembering unfinished business, I inquired about the program with which he implements automatic launch of programs on a schedule in Windows. The answer came almost immediately following the question, and he explained that this program allows you to record user actions performed on the computer, and then play them back. In a matter of minutes, he explained to me the intricacies of setting up the program and told me what could be done. The version of the program is not Russified, it is in English, and I’m not good with it, but Google Translate helps. I won’t bore you with boring stories and introductory processes, but rather tell you how to automate the launch of programs in Windows.

Advanced Key and Mouse Recorder - automatically launch programs on a schedule

The program that a Ukrainian friend recommended to me is called Advanced Key and Mouse Recorder, it is paid, but there are a lot of cracks on the Internet that allow you to activate it. Of course, I could publish a crack, but I will still adhere to the copyright rules and won’t do it, you never know 😉 You can download the Advanced Key and Mouse Recorder program from this link: http://goo.gl/2rTb1S. Look for a tablet for the program online.

You should not update the program at startup, since you will need a key, and there is no tablet yet for version 3 and higher. By the way, it is quite possible that the antivirus may complain about the program, but I have Avast, which did not generate any messages. If this happens, add the program to the list of exceptions of your antivirus software.

After launching the program, an initial dialog box will open, which will initially contain demo macros, you can watch it, or you can simply ignore it.

But if you want to understand how this software works, I advise you to look at the demo macros.

So, during the test of this version of the program, I discovered shortcomings that prevent the use of the program’s functionality on the remote desktop. In the updated version of the program, this point was taken into account and completed, but still the program will not be able to work with functions that read coordinates from the monitor, i.e. e. the program will not be able to obtain coordinates when the window is minimized, so the workstation must always be active so that the program executes scripts without errors.

This program is very suitable for those who use a separate computer to run third-party software and the computer is constantly in active mode. Let's tell you in more detail how this program can help you automate routine and similar processes on your computer, for example, when you need to automatically launch programs on a schedule.

Record a macro automatically

The program has functionality that allows you to record user actions automatically. Those. You just need to imagine the template of actions that need to be performed for the macro to work safely in automatic mode.

To start recording user actions on the computer, you need to select the Macro Explorer tab and click on the drop-down list item called “Record a Macro”.

After clicking, a dialog box will open in which you can select settings for the recorded macro; I advise you to set the values ​​as shown in the screenshot below.

If you wish, you can assign hotkeys, upon pressing which the macro will be launched. In order to eliminate unnecessary mouse movements and delays between keystrokes, you need to uncheck the corresponding fields. After clicking the “OK” button, the macro will begin to be recorded and all keystrokes and mouse clicks will be taken into account. You can tell that a macro is being recorded by seeing the Play and Stop buttons in the right corner of the screen.

After you complete all the necessary steps, click on the Stop button in the window displaying the macro recording process, in the lower right corner. A window will appear in front of you with your recorded macro; if you have not named it, it will have the default name “New Macro-1”. In order to run a macro, you can double-click on it or click once and press the “Play” button on the toolbar of the Advanced Key and Mouse Recorder program.

Next, you will be able to watch the execution of the macro, but the macro only records user actions, so if you do something in parallel, the macro will not be able to execute successfully. To do this, you need to make changes to the code of the macro itself. To enter the macro editor, select the desired macro in the window and click on the “Edit” button on the program toolbar.

After this, the macro code will open in front of you. For those who understand the general principles of programming, namely, how functions work, it will not be difficult to understand the functions that are provided for editing and completing a macro. For the second half, I will try to explain in detail what needs to be done to prohibit user actions during macro execution.

So, in order to block user actions on the keyboard or the use of the mouse, which will affect the execution of the macro, you need to select the element called “Play Control” on the macro editing page in the left list of elements and select the “Block/unlock Mouse” element in the drop-down list and Keyboard", by clicking on the element with the left mouse button 2 times.

After this, a window will open in which you need to check the “Block Mouse and Keyboard from user” element and click on the “OK” button.

After this, move the added element to the desired part of the macro; if you want the macro to block all user actions from the very beginning of its execution, then move the added function to the first line. Don't forget to unlock the mouse and keyboard by following the same steps as above, but checking the "Unlock Mouse and Keyboard from user" checkbox, adding the function to the required unlock location or to the end of the macro.

In order to set a schedule for running a macro, you must select the “Schedulers” tab in the menu on the right and click on the icon for adding a new schedule for the macro.

In the first window that opens, select the time required to run the macro or the period after which it will be executed; all elements of setting the schedule are intuitive, so I think no detailed explanation is required. In the second tab you can leave all default values. On the third tab, you need to specify the macro to which you want to link the launch according to the schedule you set and click on the “OK” button.

All currently scheduled processes can also be viewed on the “Schedulers” tab, in the schedule folders that you have specified.

In addition to the features described in this article, the program has additional functions that you can independently study and put into practice for your own purposes.

Conclusion

Today I demonstrated a program that will help automate routine tasks, reducing the time required to perform similar actions, such as:

  • automatic launch of programs according to a schedule, with subsequent completion;
  • posting content, for example, on social networks or video hosting sites;
  • imposing copyright on the image (but this also applies to the first point);
  • other similar processes.

In any case, it all depends on how much you template your task. If you manage to develop a complete algorithm of actions to complete the required task, then the Advanced Key and Mouse Recorder program will help you complete the task automatically, you just need to set up the macro once and watch the way it runs on your computer.

Don't forget to subscribe to RSS and social media accounts 😉

As an administrator, you probably have to perform the same or similar tasks almost every day. You may even be forced to come to work early or stay late to complete these tasks outside of work hours. These tasks could be routine maintenance tasks, such as deleting temporary files to prevent disks from becoming full, or backing up important data. Among these tasks, there are also more complex processes, in particular, viewing event logs on all business servers to identify problems that require solutions. The good news is that if you can break these tasks down into steps, there's a chance you can automate them. Microsoft Windows provides several ways to do this, including:

  • Schtasks is an advanced command line utility for running commands, scripts and programs on a schedule. Jobs can be scheduled to run once, every minute, at a specified interval (such as hourly, daily, or monthly), at system boot, at system logon, or while the system is idle;
  • Task Scheduler is a GUI utility for running commands, scripts and programs based on a schedule. Task Scheduler performs the same operations as the Schtasks command line utility, allowing you to use them together and manage tasks created in either utility using any tool.

Scheduling jobs on local and remote systems

You can set a schedule for anything that can be launched from the command line, including command line utilities, scripts, applications, shortcuts, and documents. You can also specify command line arguments. Sometimes jobs are assigned to the computer you are currently working on (that is, the local system). However, more often when you schedule jobs, you do it to remote systems over a network from your local computer (i.e., remote computers).

Event-driven jobs deserve special attention because they do not always work as expected; These include jobs triggered by the following events.

  • Starting the system- if you configure a task to run at system startup, the task scheduler starts it as a non-interactive process. The job runs until it is fully processed, forced to complete, or until the system is shut down. Remember that only the owner or administrator can complete running tasks.
  • Login- If you configure a job to run when a user logs in, the task scheduler runs it when someone logs in. The job runs until it is completely processed, forced to complete, or until the user logs off. Depending on how you configure it, logon tasks can run interactively or non-interactively.
  • System downtime- if you configure a task to run when the system is idle, the task scheduler starts it if there is no user activity for the specified time. For example, you can create a job that runs when the system has been idle for five minutes. But remember that further user actions will not complete the task. It will execute either until completion or until forced completion.

1. Why do we need cron?

The task scheduler allows you to execute commands on the hosting server according to a schedule.

The scheduler is managed in the section Task Scheduler .

Hosting Job Scheduler Features:

  • the minimum task execution interval is 1 minute;
  • data from standard output (stdout) and error streams (stderr) is sent to the “empty” device (/dev/null).

2. Manage scheduler jobs using the control panel

To create a new task:

1. Log in to your hosting control panel using your agreement number and password.

2. Go to the section Task Scheduler.

3. Press the button Create a task in the upper right corner.

4. On the next page, enter a name for the task.

5. Set the time when the task should run. Examples are given in paragraph 4 of this instruction.

6. Select in the field File type - Team. If necessary, you can choose a different type.

7. Select the site for which the task will be performed, if necessary.

8. Fill in the field File path or command and press the button Create.

3. Examples of command settings

3.1. Running php scripts

To run the PHP script, you can use the following command:

cd $HOME/site_folder/docs/script_folder/ && php $HOME/site_folder/docs/script_folder/script_name.php

  • cd $HOME/site_folder/docs/script_folder/ - goes to the directory where the script is located;
  • php - php interpreter;
  • $HOME/site_folder/docs/script_folder/script_name.php - full path to the script.

3.2. Running PHP scripts with parameters

wget -O - -q "http://site/cron.php?var1=xxx&var2=yyy"

  • wget - path to the wget program,
  • http://site/cron.php?var1=xxx&var2=yyy - address of the script with parameters.

3.3. Running shell scripts

To run a shell script, just specify the full path to the script as a command:

/home/id/scripts/test.sh

The script file must have an execution attribute.

4. Runtime configuration examples

Run a task once a day

  • The hour is set from 0 to 23.
  • The minute is set in the range from 0 to 59.

Run a task once a week

  • The day of the week is set in the range from 1 (Monday) to 7 (Sunday).

Run a task once a month

  • The day of the month is set in the range from 1 to 31.

5. Job status management

To turn off the task, deactivate the slider in the field Status.

To delete a task, go to its settings and click on the button Delete.