You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe your needs or suggestions for improvements
My 1panel run some cronjob every minutes, and set the status as failed if the result not right.
Then the cronjob report will get a lot of invalid logs, it affects to monitoring successful logs.
So, I created a script to delete all invalid logs containing "### mark this for dropping logs ###"
And generate a sql statement to clean those logs in database.
#!/bin/bash
# Step 1: 搜尋包含特定標記的檔案
files=$(grep -rl "### mark this for dropping logs ###" /opt/1panel/task/shell/ --include="*.log")
# 檢查是否找到檔案
if [ -z "$files" ]; then
echo "未找到含有 '### mark this for dropping logs ###' 的檔案"
exit 0
fi
# Step 2: 將檔案路徑格式化為 SQL 可用格式
files_path=$(echo "$files" | awk '{printf "\x27%s\x27,", $0}' | sed 's/,$//')
# Debug: 輸出格式化後的檔案路徑
echo "格式化後檔案路徑: $files_path"
# Step 3: 執行 SQL 刪除語句
sqlite3 /opt/1panel/db/1Panel.db <<EOF
DELETE FROM job_records WHERE records IN ($files_path);
EOF
echo "SQL 刪除語句已執行成功。"
# Step 4: 刪除實際檔案
echo "正在刪除以下檔案:"
echo "$files"
rm -f $files
echo "檔案刪除完成。"
Please describe the solution you suggest
improve the report list
Please can you set the list amount per page limit to 1000 logs ? 14 is too less.
Or set a magic keywords to drop current log, when run cronjob not in expectation.
the cronjob list now sort by created date default.
Is it possible to save the sort selection in system or cookie
1Panel Version
v1.10.25-lts
Please describe your needs or suggestions for improvements
My 1panel run some cronjob every minutes, and set the status as failed if the result not right.
Then the cronjob report will get a lot of invalid logs, it affects to monitoring successful logs.
So, I created a script to delete all invalid logs containing "### mark this for dropping logs ###"
And generate a sql statement to clean those logs in database.
Please describe the solution you suggest
improve the report list
Please can you set the list amount per page limit to 1000 logs ? 14 is too less.
Or set a magic keywords to drop current log, when run cronjob not in expectation.
the cronjob list now sort by created date default.
Is it possible to save the sort selection in system or cookie
please add a "a href=" tag to 1panel logo
It will be a super shortcut to open new tab for 1panel console by middle click of mouse
Additional Information
No response
The text was updated successfully, but these errors were encountered: