Windows Task Scheduler
Scheduling with the Windows Task Scheduler
Create recurring tasks with KantuX 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 KantuX 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 KantuX 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 KantuX Web Automation does. Just note that when you do a test run in this mode, you will see nothing – except the KantuX.exe process in the task manager. Important: For background mode, you need to set the option Run with highest privileges so KantuX can access all files and the internet from its background process. Another point to consider: Some websites do not work correctly when run in the background, in this case they can not be automated this way ("headless"). In such a case the solution is to use the first option (= start KantuX with a logged-in user).
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 KantuX 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 KantuX should run. Make sure that KantuX 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, KantuX will now start and run the macro. If you had chosen the “Run in background” option, KantuX 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 KantuX browser:
Questions? Suggestions? KantuX tech support can help. Top