diff --git a/docs/guides/tasks.md b/docs/guides/tasks.md index 10dec5879..5fee3b0f4 100644 --- a/docs/guides/tasks.md +++ b/docs/guides/tasks.md @@ -245,6 +245,7 @@ python main.py scheduler load-initial-schedule ``` > Remember, that if you do not explicitly import these, they will not be available to the scheduler. +> Importing schedules more than once will create duplicates. ### Manually executing tasks When doing development, it is possible to manually make the scheduler run your task even if your Orchestrator instance is not in "scheduler mode." diff --git a/docs/guides/upgrading/4.0.md b/docs/guides/upgrading/4.0.md index 02ad7c06e..984b30549 100644 --- a/docs/guides/upgrading/4.0.md +++ b/docs/guides/upgrading/4.0.md @@ -80,12 +80,18 @@ The 4.7.0 migration will create the `apscheduler_jobs` table if missing, so upgr ### Who needs to take action? -**Users upgrading from 4.4–4.6:** - - Nothing special required; your scheduler data already exists. +Everyone who is upgrading to >= 4.7.0 needs to take action. +The following schedules will exist in the APScheduler database table: -**Users upgrading from <4.4 who used the old decorator:** - - Your schedules will not automatically reappear. Restore them by running: - - + task_resume_workflows + task_clean_up_tasks + task_validate_subscriptions + +They will however be removed once the scheduler service starts and can no longer find these schedules in the codebase. + +If you want to keep these schedules running, you will need to re-create them using the new Scheduler API. + + - Re-create them by running: ``` python main.py scheduler load-initial-schedule ``` @@ -93,4 +99,9 @@ The 4.7.0 migration will create the `apscheduler_jobs` table if missing, so upgr Make sure your schedule definitions are imported so the scheduler can discover them. **Users who never used the decorator:** -- No action required; the migration creates the table and you can add schedules normally. +- You still need to run the command above to ensure the old schedules are created in the database. +- the migration creates the table and you can add schedules normally via the API. + + +> Remember, that if you do not explicitly import these, they will not be available to the scheduler. +> Importing schedules more than once will create duplicates.