Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改定时清理阿里云盘频率 #189

Closed
wants to merge 3 commits into from
Closed

修改定时清理阿里云盘频率 #189

wants to merge 3 commits into from

Conversation

LINJIAXIN-China
Copy link
Contributor

修改为每天清理一次,整点清理,默认为每天5点清理,可通过变量AUTO_CLEAR_INTERVAL进行自定义设定

修改定时清理任务为每天固定时间执行清理,默认每天5:00
修改对应变量AUTO_CLEAR_INTERVAL说明
修改对应变量AUTO_CLEAR_INTERVAL说明
@monlor
Copy link
Owner

monlor commented Jul 9, 2024

有用户云盘空间不足,需要清理的更频繁

@LINJIAXIN-China
Copy link
Contributor Author

那在是否启用清理云盘设定,启用时可配置day/hour/month进行设定清理频率单位,这样是否更好?
目前写的这个,我设置120分钟直接不清理了,他这个写法有误。我在网上找了关于crontab这个语法的信息,有在你公众号留言。

@monlor
Copy link
Owner

monlor commented Jul 9, 2024

目前的是没问题的,昨天有个版本有问题,小雅的crontab把我这边的覆盖了,你更新版本进alist容器检查cron配置

@LINJIAXIN-China
Copy link
Contributor Author

目前测试是可以,受限于cron定时任务的语法,有两点注意点:
1、大于60分钟的清理频率会以去尾法精确到小时,清理时间为对应小时的60的余数分钟时,举例:设置150分钟,则每2小时清理一次,在30分的时候执行,分别是:0:30,2:30,4:30,6:30以此类推
2、小于60分钟的清理频率若不是60的约数则会被修改为1小时。举例:设置50分钟,则每小时的50分进行清理,分别是:0:50,1:50,2:50,3:50以此类推

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants