Horje
flask run function every minute Code Example
flask run function every minute
import time
import atexit

from apscheduler.schedulers.background import BackgroundScheduler


def print_date_time():
    print(time.strftime("%A, %d. %B %Y %I:%M:%S %p"))


scheduler = BackgroundScheduler()
scheduler.add_job(func=print_date_time, trigger="interval", seconds=60)
scheduler.start()

# Shut down the scheduler when exiting the app
atexit.register(lambda: scheduler.shutdown())




Python

Related
select each two elements on a list python Code Example select each two elements on a list python Code Example
how to make a histogram with plotly for a single variable Code Example how to make a histogram with plotly for a single variable Code Example
django default template location Code Example django default template location Code Example
regex python multiline Code Example regex python multiline Code Example
Bar Plot Seaborn with No Error Bars Code Example Bar Plot Seaborn with No Error Bars Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7