crython/tab¶
Contains functionality for executing jobs (python functions) from cron expressions.
-
class
crython.tab.CronTab(*args, **kwargs)¶ Background thread responsible for executing background jobs.
-
register(name, job)¶ Register the given name and function.
Parameters: - name – Name of the registered job. Note: This should be unique.
- job – Callable decorated with
job()to execute.
Returns: None.
-
deregister(name)¶ De-register the job that was registered with the given name.
Parameters: name – Name of the job to remove. Returns: None.
-
stop()¶ Stop this background thread from executing any more jobs.
Returns: None.
-
run()¶ Background function that processes all registered jobs and invokes them based on their context and expression.
-