I am trying to delete files in the 1
folder if they are older than 1 day. What I need to know is if the following cron job will do this.
我试图删除1文件夹中的文件,如果它们超过1天。我需要知道的是,如果以下cron作业将执行此操作。
find /public_html/kronofiles.com/uploads/1/ -mtime +1 -exec rm {} \;
1 个解决方案
#1
1
this is an example line from a crontab file
这是来自crontab文件的示例行
0 0 * * 0 sh /path/to/file
this says execute the file at 00:00 everyday. next comes the command to execute. sh
in this case for a shell script. this could be many things, PHP for example. next is the file you want to execute.
这表示每天00:00执行文件。接下来是执行命令。在这种情况下,对于shell脚本。这可能是很多东西,例如PHP。 next是您要执行的文件。
are you asking how to format a crontab entry? or are you asking if your script will work when executed?
你在问如何格式化crontab条目吗?或者你问你的脚本在执行时是否有效?
#1
1
this is an example line from a crontab file
这是来自crontab文件的示例行
0 0 * * 0 sh /path/to/file
this says execute the file at 00:00 everyday. next comes the command to execute. sh
in this case for a shell script. this could be many things, PHP for example. next is the file you want to execute.
这表示每天00:00执行文件。接下来是执行命令。在这种情况下,对于shell脚本。这可能是很多东西,例如PHP。 next是您要执行的文件。
are you asking how to format a crontab entry? or are you asking if your script will work when executed?
你在问如何格式化crontab条目吗?或者你问你的脚本在执行时是否有效?