-1

I have Python 3. I wrote a script that opens the Chrome browser. But I would like to run that script on a specific time of the day. This is not repeated scheduling or anything. I just want it to run at a specific time of the day. I am at Pacific Standard Time.

from selenium import webdriver

from selenium.webdriver.chrome.service import Service

options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)
driver = webdriver.Chrome(options=options, service=Service("C:\\Users\\marts\\Downloads\\Chromedriver110\\chromedriver.exe"))

driver.get("https://www.google.com")
MatthewMartin
  • 32,326
  • 33
  • 105
  • 164
  • 1
    Welcome to Stack Overflow. The question is not clear. Are you asking for the Python program to run all the time, check what time it is, and then run a specific part of the code? Or do you want *the operating system, or a different program* to check the time, and start your Python script (which was not already running)? In the latter case, **why should it matter** that the script is written in Python, or what it does? – Karl Knechtel Mar 11 '23 at 02:11
  • 1
    If you want another program (including the operating system) to do it, that is off topic; we don't offer recommendations for tools, and if you have already found a program and need help using it, we don't do tech support. Please try https://superuser.com for "how can I use my computer more effectively?" type questions. – Karl Knechtel Mar 11 '23 at 02:12
  • 1
    Depends if you have Windows, Linux, or MacOS. – Stu Sztukowski Mar 11 '23 at 02:58

1 Answers1

0

For a python way to do it, use APScheduler

For a unix way to do it, chrontab or at

And there are many other opensource tools that are task or job runners.

MatthewMartin
  • 32,326
  • 33
  • 105
  • 164