Python Forum
How to trigger python script twice a day
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to trigger python script twice a day
#1
Hi,
I want to trigger my python program every day at 8 am & 11 pm. I try to test this using below code, but the program did work well.

import schedule
import time

def job():
    print("I'm working...")
schedule.every().day.at("23:06").do(job)
print('hi at 23:06')
schedule.every().day.at("23:08").do(job)
print('Hi 23:08')
How to trigger at specified times?
Reply


Messages In This Thread
How to trigger python script twice a day - by SriMekala - Aug-29-2019, 03:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,009 Jun-29-2023, 11:57 AM
Last Post: gologica
  How to trigger for loop after while quest 2 1,489 Mar-22-2022, 11:34 PM
Last Post: quest
  Pandas, How to trigger parallel loop Mekala 4 2,653 Oct-29-2020, 12:58 PM
Last Post: Mekala
  How to kill a bash script running as root from a python script? jc_lafleur 4 5,794 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur
  crontab on RHEL7 not calling python script wrapped in shell script benthomson 1 2,254 May-28-2020, 05:27 PM
Last Post: micseydel
  Package python script which has different libraries as a single executable or script tej7gandhi 1 2,583 May-11-2019, 08:12 PM
Last Post: keames
  How to run python script which has dependent python script in another folder? PrateekG 1 3,106 May-23-2018, 04:50 PM
Last Post: snippsat
  How to call one python script and use its output in another python script lravikumarvsp 3 32,289 May-16-2018, 02:08 AM
Last Post: lravikumarvsp
  Why does my Switch trigger all Cases? IAMK 6 3,835 Apr-09-2018, 11:12 AM
Last Post: snippsat
  Check Python version from inside script? Run Pythons script in v2 compatibility mode? pstein 2 9,790 Jul-07-2017, 08:59 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020