Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to schedule python script in windows

In CMD for Windows 10/11:
> at æ "ø"

Insert time instead of æ, for example like this: at 10:25 "ø"
Insert path to file instead of ø, for example this: C:UsersClumsyAppDataLocalProgramsPythonPython39myscript.exe
This also works for .ahk and .py scripts, and I think it works with others (such as .js and .bat)
Comment

windows task scheduler python script

#------ Windows desktop notifier application using python tkinter -----------------
  from tkinter import *
  from plyer import notification
  from tkinter import messagebox
  from PIL import Image, ImageTk
  import time
  
  t = Tk()
  t.title('Notifier')
  t.geometry("500x300")
  img = Image.open("notify-label.png")
  tkimage = ImageTk.PhotoImage(img)
  
  # get details
  def get_details():
      get_title = title.get()
      get_msg = msg.get()
      get_time = time1.get()
      # print(get_title,get_msg, tt)
  
      if get_title == "" or get_msg == "" or get_time == "":
          messagebox.showerror("Alert", "All fields are required!")
      else:
          int_time = int(float(get_time))
          min_to_sec = int_time * 60
          messagebox.showinfo("notifier set", "set notification ?")
          t.destroy()
          time.sleep(min_to_sec)
  
          notification.notify(title=get_title,
                              message=get_msg,
                              app_name="Notifier",
                              app_icon="ico.ico",
                              toast=True,
                              timeout=10)
  
  img_label = Label(t, image=tkimage).grid()
  
  # Label - Title
  t_label = Label(t, text="Title to Notify",font=("poppins", 10))
  t_label.place(x=12, y=70)
  
  # ENTRY - Title
  title = Entry(t, width="25",font=("poppins", 13))
  title.place(x=123, y=70)
  
  # Label - Message
  m_label = Label(t, text="Display Message", font=("poppins", 10))
  m_label.place(x=12, y=120)
  
  # ENTRY - Message
  msg = Entry(t, width="40", font=("poppins", 13))
  msg.place(x=123,height=30, y=120)
  
  # Label - Time
  time_label = Label(t, text="Set Time", font=("poppins", 10))
  time_label.place(x=12, y=175)
  
  # ENTRY - Time
  time1 = Entry(t, width="5", font=("poppins", 13))
  time1.place(x=123, y=175)
  
  # Label - min
  time_min_label = Label(t, text="min", font=("poppins", 10))
  time_min_label.place(x=175, y=180)
  
  # Button
  but = Button(t, text="SET NOTIFICATION", font=("poppins", 10, "bold"), fg="#ffffff", bg="#528DFF", width=20,
               relief="raised",
               command=get_details)
  but.place(x=170, y=230)
  
  t.resizable(0,0)
  t.mainloop()
Comment

PREVIOUS NEXT
Code Example
Python :: python ignore first value in generator 
Python :: Dynamic Form Fields Django 
Python :: how to index lists in python 
Python :: slack notification pytthon 
Python :: Example of floor method in python 
Python :: Python list append tutorial 
Python :: python calculator 
Python :: python create empty list size n 
Python :: os.path.join 
Python :: how to standardize the image data to have values between 0 and 1 
Python :: python environment variable 
Python :: control flow in python 
Python :: run python file from cmd 
Python :: pandas drop columns 
Python :: Yield Expressions in python 
Python :: python file 
Python :: standard error of mean 
Python :: python linkedin api 
Python :: remove item in dict 
Python :: python unbound variable 
Python :: how to check if variable in python is of what kind 
Python :: tuplein python 
Python :: python lenght 
Python :: discord.py get client avatar 
Python :: python create a global variable 
Python :: how to convert decimal to binary 
Python :: python program to find sum of array elements 
Python :: print treelib.Tree 
Python :: python string: indexing and slicing string 
Python :: python - dashboard 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =