dougaxing8673
2018-10-12 20:45
浏览 131
已采纳

Cron作业根据时间重命名媒体文件

I have a media file that I would like to present to users on my site based on time of day. I would like to use a CRON job to rename the files so that I can easily manage the media being displayed.

i.e.

default media displayed on site is default.mp4

default.mp4 renamed to 0.mp4 at 03:00 and 1.mp4 is renamed to default.mp4

default.mp4 renamed to 1.mp4 at 03:00 and 2.mp4 renamed to default.mp4

default.mp4 renamed to 2.mp4 at 03:00 and 3.mp4 renamed to default.mp4

and so on....

what is the CRON job syntax for this?

图片转代码服务由CSDN问答提供 功能建议

我有一个媒体文件,我想根据时间向我网站上的用户展示。 我想使用CRON作业重命名文件,以便我可以轻松管理正在显示的媒体。</ p>

即</ p>

默认媒体显示在 site is default.mp4 </ p>

default.mp4在03:00重命名为0.mp4,而.mp4重命名为default.mp4 </ p>

默认值 .mp4在03:00重命名为1.mp4,2.mp4重命名为default.mp4 </ p>

default.mp4在03:00重命名为2.mp4,3.mp4重命名为默认 .mp4 </ p>

依旧.... </ p>

这是什么CRON作业语法?</ p> </ div>

1条回答 默认 最新

相关推荐 更多相似问题