Schedule Mixin
ScheduleMixin¶
The ScheduleMixin class provides a plugin with the ability to call functions at regular intervals.
- Functions are registered with the InvenTree worker which runs as a background process.
- Scheduled functions do not accept any arguments
- Plugin member functions can be called
- Global functions can be specified using dotted notation
Enable Schedule Integration
The Enable Schedule Integration option but be enabled, for scheduled plugin events to be activated.
Sample Plugin¶
An example of a plugin which supports scheduled tasks:
A sample plugin which provides support for scheduled tasks.
Source code in src/backend/InvenTree/plugin/samples/integration/scheduled_task.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |