Python TASK SCHEDULER: Automatically run a Python Script (Windows) | jcchouinard.com

preview_player
Показать описание
In this video we will learn how to run a Python Script automatically on Windows using windows task scheduler.

-----
Support my work:

Subscribe to the Python course waitlist:

Subscribe to this channel:

Follow me:

----
Transcription:
hi everyone my name is today we will
learn how to automate the execution of a
python script using Windows task
scheduler
so you can search for my article using
python test scheduler and go to the
article and you'll have everything you
need in order to uh know what to do
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 that we're going to create a
python script first
that has this information so all despite
encrypt this does is that it prints the

so now that we have the script we will
open Windows test scheduler so we go
here we search for task scheduler and we
open the app
the first thing we will do is we will
create a task
and we will say
uh tell me
the time
so tell me the time so we create that
task and then we need to create an
action for the file
so what the action is is what do you
want the task to do so you go there you
click on new and then what you'll need
to do is you will need to tell where
python is installed
so in order to tell where python is
installed you can go to command prompt
and you can type
where python where python
and then you have where the python
script is installed 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 right time dot pi
and you want to tell where the the 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

so once the action is created we need to
tell it when to execute so you can go in
triggers
press on you
and then you select daily weekly monthly
or whatever you want and then you can
say I want to run this daily and I say
okay okay and this task will start
running daily
so if you're not sure if the task has
executed you can always press on run and
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 uh 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 task and then you will
double click on the task and then you
can go to the properties and you can
change your Trigger action so instead
here I could change this to trigger to
55
and say okay let's run it
if I want to delete the task all I go is
click on delete
yes
so this is how you run a python script
on automation using uh task scheduler on
Windows see you next
Рекомендации по теме
Комментарии
Автор

It wasn't working until I put the python path on the program/script section with "quotations", I don't know why but that's how I got it running

DanielGarcia-zevy