robfig / cron

a cron library for go
MIT License
13.16k stars 1.63k forks source link

Save history of jobs in persistent storage #214

Open frndmg opened 5 years ago

frndmg commented 5 years ago

It could be useful to store the history of executed (or failed tasks) into persistent storage (SQLite, etc). For example, to restore previously broken tasks. Or just to automatically keep an eye on previously executed tasks.

sm4ll-3gg commented 5 years ago

This pull request is preparation for storing schedule inside external storage: https://github.com/robfig/cron/pull/251

robfig commented 5 years ago

I think this is possible today by creating a custom JobWrapper that records this information for each execution. You can include it using cron.WithChain when creating your cron instance