Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to run python module every 10 sec

import schedule
import time

def job():
    print("I'm working...")

schedule.every(10).minutes.do(job)
schedule.every().hour.do(job)
schedule.every().day.at("10:30").do(job)

while 1:
    schedule.run_pending()
    time.sleep(1)
Comment

PREVIOUS NEXT
Code Example
Python :: list variables in session tensorflow 1 
Python :: slicing of tuple in python 
Python :: how to run a python script 
Python :: python program to switch first and second characters in a string 
Python :: python compare timestamps 
Python :: how to know the python pip module version 
Python :: dataset for cancer analysis in python 
Python :: contextlib.subppress python 
Python :: how do i limit decimals to only two decimals in python 
Python :: pyspark print a column 
Python :: tuple plot python 
Python :: python create venv 
Python :: python substring count 
Python :: numpy average 
Python :: mkvirtualenv environment python 3 
Python :: python sort multiple lists based on sorting of single list 
Python :: json decode py 
Python :: copy only some columns to new dataframe in r 
Python :: python dict setdefault 
Python :: test_size 
Python :: adding roles discord py 
Python :: finding odd even python 
Python :: remove tab space from string in python 
Python :: getters and setters in python 
Python :: set allowed methods flask 
Python :: convert 2d string array to float python 
Python :: python projects with source code 
Python :: code fibonacci python 
Python :: how to restart loop python 
Python :: font in tkinter 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =