diff --git a/defaults/main.yml b/defaults/main.yml index 249bdc91..dd1cfe3a 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -212,7 +212,8 @@ freeradius_eap_openwisp_site_template_src: freeradius/eap/openwisp_site.j2 freeradius_eap_inner_tunnel_template_src: freeradius/eap/inner_tunnel.j2 freeradius_eap_template_src: freeradius/eap/eap.j2 cron_delete_old_notifications: "'hour': 0, 'minute': 0" -cron_deactivate_expired_users: "'hour': 0, 'minute': 5" +cron_deactivate_expired_users: "'hour': 0, 'minute': 1" +cron_expiration_reminder_email: "'hour': 0, 'minute': 3" cron_delete_old_radiusbatch_users: "'hour': 0, 'minute': 10" cron_cleanup_stale_radacct: "'hour': 0, 'minute': 20" cron_delete_old_postauth: "'hour': 0, 'minute': 30" diff --git a/docs/user/role-variables.rst b/docs/user/role-variables.rst index 7141b00b..c840d8f8 100644 --- a/docs/user/role-variables.rst +++ b/docs/user/role-variables.rst @@ -447,7 +447,8 @@ take a look at `the default values of these variables # Defaults to "templates/freeradius/eap/eap.j2" shipped in the role. freeradius_eap_template_src: custom_eap.j2 cron_delete_old_notifications: "'hour': 0, 'minute': 0" - cron_deactivate_expired_users: "'hour': 0, 'minute': 5" + cron_expiration_reminder_email: "'hour': 0, 'minute': 3" + cron_deactivate_expired_users: "'hour': 0, 'minute': 1" cron_delete_old_radiusbatch_users: "'hour': 0, 'minute': 10" cron_cleanup_stale_radacct: "'hour': 0, 'minute': 20" cron_delete_old_postauth: "'hour': 0, 'minute': 30" diff --git a/templates/openwisp2/settings.py b/templates/openwisp2/settings.py index 68852fea..10a75abd 100644 --- a/templates/openwisp2/settings.py +++ b/templates/openwisp2/settings.py @@ -253,6 +253,14 @@ "schedule": crontab(**{ {{ cron_password_expiration_email }} }), }, {% endif %} + "deactivate_expired_users": { + "task": "openwisp_users.tasks.deactivate_expired_users", + "schedule": crontab(**{ {{ cron_deactivate_expired_users }} }), + }, + "expiration_reminder_email": { + "task": "openwisp_users.tasks.expiration_reminder_email", + "schedule": crontab(**{ {{ cron_expiration_reminder_email }} }), + }, {% if openwisp2_notifications_delete_old_notifications %} "delete_old_notifications": { "task": "openwisp_notifications.tasks.delete_old_notifications", @@ -267,12 +275,6 @@ }, {% endif %} {% if openwisp2_radius and openwisp2_radius_periodic_tasks %} - "deactivate_expired_users": { - "task": "openwisp_radius.tasks.deactivate_expired_users", - "schedule": crontab(**{ {{ cron_deactivate_expired_users }} }), - "args": None, - "relative": True, - }, "delete_old_radiusbatch_users": { "task": "openwisp_radius.tasks.delete_old_radiusbatch_users", "schedule": crontab(**{ {{ cron_delete_old_radiusbatch_users }} }), @@ -415,6 +417,8 @@ LANGUAGE_CODE = "{{ openwisp2_language_code }}" TIME_ZONE = "{{ openwisp2_time_zone }}" +CELERY_TIMEZONE = TIME_ZONE + {% if openwisp2_internationalization %} USE_I18N = True {% endif %}