mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-10 03:39:59 +00:00
perf: 统一后台定时任务的crontab表达式, 对于后台定时执行的任务更加清晰
This commit is contained in:
@@ -15,6 +15,7 @@ from orgs.models import Organization
|
||||
from .models import User
|
||||
from users.notifications import UserExpirationReminderMsg
|
||||
from settings.utils import LDAPServerUtil, LDAPImportUtil
|
||||
from common.const.crontab import CRONTAB_AT_AM_TEN, CRONTAB_AT_PM_TWO
|
||||
|
||||
|
||||
logger = get_logger(__file__)
|
||||
@@ -41,7 +42,7 @@ def check_password_expired_periodic():
|
||||
'check_password_expired_periodic': {
|
||||
'task': check_password_expired.name,
|
||||
'interval': None,
|
||||
'crontab': '0 10 * * *',
|
||||
'crontab': CRONTAB_AT_AM_TEN,
|
||||
'enabled': True,
|
||||
}
|
||||
}
|
||||
@@ -72,7 +73,7 @@ def check_user_expired_periodic():
|
||||
'check_user_expired_periodic': {
|
||||
'task': check_user_expired.name,
|
||||
'interval': None,
|
||||
'crontab': '0 14 * * *',
|
||||
'crontab': CRONTAB_AT_PM_TWO,
|
||||
'enabled': True,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user