Windows Task Scheduler
Scheduling with the Windows Task Scheduler
Create recurring tasks with Kantu and the Windows Task Scheduler. The Windows Task Scheduler is a very powerful task scheduling application that is built into any Windows version. The screenshots on this page are taken on Windows 10, but the task scheduler user interface has not really changed much the last years. So it is the same procedure on Windows 7 and Windows Server 2012R2 and Windows Server 2016. To open the task scheduler, you can use the Windows search box and search for it:
Next, select “Create Task” and the task scheduler wizard opens. It starts with the security tab: Top
Security Tab ("Runas")
This tab is important. Here you decide how your application is run- You have two options:
- “Run only when user is logged in” . This is the best option to start, as then Kantu will run under your user account, just like when you manually start it. It is visible and you can check if all works well. Once that works, you can change the settings to the background mode.
- “Run whether user is logged in or not.” . This option makes Kantu run as a background process, even when no user is logged in (sometimes also called “headless mode"). Most visual automation software does not support this mode, but Kantu Web Automation does. Just note that when you do a test run in this mode, you will see nothing – except the Kantu.exe process in the task manager. Important: For background mode, you need to set the option Run with highest privileges so Kantu can access all files and the internet from its background process.
On this tab you select when and how often you want to start the process. In this example the process starts at Windows starts and then runs every 5 minutes
Insider tip: Note that when you set a start time, e. g. 9:00 am and want to test it a bit later, maybe at 9:30am, nothing will happen for the next 23 hours. So the 9:00am start is not trigged until the next time it is actually 9am.Top
Use the “browse” button to locate the program or script you want to start. In our case this is the “kantu.exe” file. In the “Arguments” box enter the command line arguments, in our case this is the “Demo-Automate-Forms.kmacro” (do not forget the the .kmacro extension) and the -ae (“and exit”) switch to tell Kantu to exit once the macro has been run. Note that there has to be a " " (space) between the macro name and the "-ae" switch.
Nothing to do here. If you selected “Run only when user is logged in” in on the first tab, just click. If you had chosen the “Run in background” option, the scheduler prompts you for the user name and password under which account Kantu should run. Make sure that Kantu has actually been installed in the user account that you enter here. That is all, the scheduled task is set-up.
Test and debug Windows Task Scheduler
For testing, select the task, right-click on it and select “Run”. If you selected “Run only when user is logged in” in on the first tab, Kantu will now start and run the macro. If you had chosen the “Run in background” option, Kantu will also start, but you will see nothing, as it runs as background process.
Check return code
If a task ran successfully, the return code is "0x0":
Check background processModerate CPU usage, some file usage and some internet activity are the sign of a healthy instance of the Kantu browser:
Questions? Suggestions? Kantu tech support can help. Top