Add scheduled Job doc (#3847) [ci skip]
This commit is contained in:
parent
4a6b6b80fc
commit
59217d76a7
2 changed files with 20 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ items:
|
|||
- admin.md
|
||||
- previewing-emails.md
|
||||
- notification.md
|
||||
- scheduled-jobs.md
|
||||
---
|
||||
|
||||
# Backend Guide
|
||||
|
|
|
|||
19
docs/backend/scheduled-jobs.md
Normal file
19
docs/backend/scheduled-jobs.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
title: Scheduled Jobs
|
||||
---
|
||||
|
||||
# Scheduled Jobs
|
||||
|
||||
As in the [Technical Overview](/technical-overview), We use [Heroku Scheduler](https://devcenter.heroku.com/articles/scheduler) for scheduled jobs. As the name suggests, this is for regularly recurring tasks that need to be run every day, week, month, year, decade, and century.
|
||||
|
||||
Tasks are implemented in `dev.to/lib/tasks/fetch.rake`, typically in the form of:
|
||||
|
||||
```
|
||||
task some_unique_task_name:, [optional_arg] => :environment do |optional_arg|
|
||||
... do your thing here ...
|
||||
end
|
||||
```
|
||||
|
||||
You can explore the [official Heroku documentation](https://devcenter.heroku.com/articles/scheduler#defining-tasks) for defining tasks and read through tasks we have implemented for busting cache, awarding badges, and more.
|
||||
|
||||
In your Pull Request, communicate with a DEV Core Team Member to discuss at what frequency and ensure your task is scheduled on Heroku once your code is reviewed, approved and merged.
|
||||
Loading…
Add table
Reference in a new issue