Add a cron_setup
task to initialize code-defined cron tasks.
This commit is contained in:
parent
9fa3084b0f
commit
576bf6bb89
5 changed files with 88 additions and 1 deletions
|
@ -13,7 +13,7 @@ import redis
|
|||
from sqlalchemy.orm import relationship, Session
|
||||
from sqlalchemy.schema import Column, ForeignKey
|
||||
from sqlalchemy.sql.sqltypes import (Boolean, DateTime, Integer, SmallInteger,
|
||||
Text, Time)
|
||||
Text, Time, String)
|
||||
|
||||
from files.classes.base import CreatedBase
|
||||
from files.helpers.time import format_age, format_datetime
|
||||
|
@ -247,6 +247,9 @@ class RepeatableTask(CreatedBase):
|
|||
frequency_day = Column(SmallInteger, nullable=False)
|
||||
time_of_day_utc = Column(Time, nullable=False)
|
||||
|
||||
# used for the cron hardcoding system
|
||||
label = Column(String, nullable=True, unique=True)
|
||||
|
||||
runs = relationship("RepeatableTaskRun", back_populates="task")
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue