l4rm4nd / VoucherVault

Django web application to store and manage vouchers, coupons, loyalty and gift cards digitally. Supports expiry notifications, transaction histories, file uploads and OIDC SSO.
https://github.com/l4rm4nd/VoucherVault/wiki
GNU General Public License v3.0
125 stars 2 forks source link

Crontab default task #8

Closed lksrmp closed 2 months ago

lksrmp commented 2 months ago

Default scheduling for notifications */14400 * * * * causes execution every hour. I would suggest something like 0 6 * * 1 for every Monday at 6am.

l4rm4nd commented 2 months ago

Have you confirmed that the default configured crontab runs every minute? It should only run every 10 days. Does so in my environment. Will test now again.

Anyways, you are free to define your own schedule/interval/crontab via the admin panel.

I would only adjust if it is a bug.

lksrmp commented 2 months ago

I connected it to Telegram and got notifications every full hour. Already adjusted mine, thanks. crontab guru describes the setting as “At every 14400th minute” but clicking on "next" underneath reveals

next at 2024-07-18 17:00:00
then at 2024-07-18 18:00:00
then at 2024-07-18 19:00:00
then at 2024-07-18 20:00:00
then at 2024-07-18 21:00:00
l4rm4nd commented 2 months ago

I connected it to Telegram and got notifications every full hour.

Hmm that's weird. I've tested my instance also but do not receive hourly expiry notifications.

I'll update the default to run once a week. I don't like the */14400 anyways and it's based on the time VoucherVoult was spawned, which is also not that beneficial.

l4rm4nd commented 2 months ago

See https://github.com/l4rm4nd/VoucherVault/commit/2741ef84b4735ebcaaf9e7e6c3d1705f39aba8b0