Skip to content

Allow plugin authors to register housekeeping tasks #16971

Closed
@jsenecal

Description

@jsenecal

NetBox version

v4.0.7

Feature type

New functionality

Proposed functionality

NetBox includes a housekeeping management command that usually runs nightly. This command handles:

  • Clearing expired authentication sessions from the database
  • Deleting older changelog records
  • Deleting older job result records
  • Checking for new NetBox releases

It would be great if plugin authors could register additional tasks to run by the housekeeping process without having to write their own management commands and setup mechanisms to run those periodically.

Use case

I often have to write periodic tasks to alter model instances in my plugins, reacting to dates, sending emails etc. and having to setup the whole management commands and related mechanisms to run those periodically is not really convenient, even more so considering that NetBox already has mechanisms built in to do so.

Database changes

None whatsoever

External dependencies

None

Metadata

Metadata

Assignees

Labels

complexity: lowRequires minimal effort to implementnetboxstatus: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions