mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
17 lines
347 B
Go
17 lines
347 B
Go
package cron
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/mayswind/ezbookkeeping/pkg/services"
|
|
)
|
|
|
|
var RemoveExpiredTokensJob = &CronJob{
|
|
Name: "RemoveExpiredTokens",
|
|
Description: "Periodically remove expired user tokens from the database.",
|
|
Interval: 24 * time.Hour,
|
|
Run: func() error {
|
|
return services.Tokens.DeleteAllExpiredTokens(nil)
|
|
},
|
|
}
|