0:00
Hi everyone, my name is Jean Christophev Chouna
0:03
Today we will learn how to automate the execution of a Python script using Windows Task Scheduler
0:10
So you can search for my article using Python Task Scheduler and go to the article and you'll have everything in need in order to know what to do
0:21
Everything I'm telling you in this tutorial will be in there. If you want to get started, the first thing we need to know is
0:29
we need to know is that we're going to create a Python script first
0:34
that has this information. So all this Python crypt does is that it prints the time
0:41
and save it to a test.test of text file. So now that we have the script, we will open Windows Task Scheduler
0:52
So we go here, we search for Task Scheduler, and we open the app
0:59
The first thing we will do is we will create a task
1:05
And we will say, tell me the time
1:14
So tell me the time. So we create that task and then we need to create an action for the file
1:21
So what the action is is what do you want the task to do
1:25
So you go there, you click on new and then what you'll need to do is
1:28
is you will need to tell where Python is installed. So in order to tell where Python is installed
1:35
you can go to Command Prompt, and you can type where Python
1:42
Where Python. And then you have where the Python script is installed
1:48
So you can copy this and you can paste it here So now you tell where your Python script is installed Next you tell the name of the script so write time And you want to tell where the file is stored So you can come here and you can copy path and within your task you will tell the location of the file Then you click OK
2:20
So once the action is created, we need to tell it when to execute
2:26
So you can go in triggers, press on you, and then you select daily, weekly, monthly, or whatever
2:34
you want, and then you can say, I want to run this daily, and I say, okay, okay, and this
2:39
task will start running daily. So if you're not sure if the task has executed, you can always press on run and
2:50
see what's going on. And as you can see, by running test scheduler, the new test file was created telling me the time. So let's come back and just show what we do if it doesn't work. So you can come back, open test scheduler from script. So sometimes you'll be on that screen. So if you cannot find your action, you will go to active tasks and you will try to find your test. And then you will double click
3:20
on the task and then you can go to the properties and you can change your trigger action so instead
3:26
here I could change this to trigger to 55 and say okay let's run it if I want to delete the task
3:37
all I go is click on delete yes so this is how you run a Python script on automation
3:46
using task scheduler on Windows see you next next time