Skip to content

Commit 017c34e

Browse files
committed
Fix mismatches in readme
1 parent 4813c71 commit 017c34e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ You can create and delete recurring tasks at runtime, without editing the config
722722
#### Creating a recurring task
723723

724724
```ruby
725-
SolidQueue.schedule_recurring_task(
725+
SolidQueue.create_recurring_task(
726726
"my_dynamic_task",
727727
command: "puts 'Hello from a dynamic task!'",
728728
schedule: "every 10 minutes"
@@ -734,25 +734,25 @@ This will create a dynamic recurring task with the given key, command, and sched
734734
#### Deleting a recurring task
735735

736736
```ruby
737-
SolidQueue.delete_recurring_task(task_id)
737+
SolidQueue.destroy_recurring_task(key)
738738
```
739739

740-
This will delete a dynamically scheduled recurring task by its ID. If you attempt to delete a static (configuration-defined) recurring task, an error will be raised.
740+
This will delete a dynamically scheduled recurring task by its key. If you attempt to delete a static (configuration-defined) recurring task, an error will be raised.
741741

742742
> **Note:** Static recurring tasks (those defined in `config/recurring.yml`) cannot be deleted at runtime. Attempting to do so will raise an error.
743743

744744
#### Example: Creating and deleting a recurring task
745745

746746
```ruby
747747
# Create a new dynamic recurring task
748-
recurring_task = SolidQueue.schedule_recurring_task(
748+
recurring_task = SolidQueue.create_recurring_task(
749749
"cleanup_temp_files",
750750
command: "TempFileCleaner.clean!",
751751
schedule: "every day at 2am"
752752
)
753753
754-
# Delete the task later by ID
755-
SolidQueue.delete_recurring_task(recurring_task.id)
754+
# Delete the task later by key
755+
SolidQueue.destroy_recurring_task("cleanup_temp_files")
756756
```
757757

758758
## Inspiration

0 commit comments

Comments
 (0)