mirror of
https://github.com/miniflux/v2.git
synced 2025-07-27 17:28:38 +00:00
Add the possibility to run Miniflux as a cronjob
This commit is contained in:
parent
c3250257b1
commit
c85b19098d
3 changed files with 28 additions and 2 deletions
|
@ -38,10 +38,10 @@ func Serve(store *storage.Storage, pool *worker.Pool) {
|
|||
func feedScheduler(store *storage.Storage, pool *worker.Pool, frequency, batchSize int) {
|
||||
for range time.Tick(time.Duration(frequency) * time.Minute) {
|
||||
jobs, err := store.NewBatch(batchSize)
|
||||
logger.Info("[Scheduler:Feed] Pushing %d jobs to the queue", len(jobs))
|
||||
if err != nil {
|
||||
logger.Error("[Scheduler:Feed] %v", err)
|
||||
} else {
|
||||
logger.Debug("[Scheduler:Feed] Pushing %d jobs", len(jobs))
|
||||
pool.Push(jobs)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue