问题描述
- 最初上传内容 li>
- 在定义的时间推送它
我不知道如何使用这样的东西。
我试图将.html,.php和.jpg文件上传到多个不同的目录,在同一个未来时间。
我使用的是Linux,cPanel,PHP。典型的LAMP堆栈+ cPanel。
任何输入都可以。
> cron真的很容易。编辑作业类型
crontab -e
这将给你一个空白文件,其中包含解释其结构的注释。
使用带有通配符的数字来说明何时运行东西,然后运行什么。
例如,从, p>
#在午夜后运行5分钟,每天
5 0 * * * HOME / bin / daily.job> > $ HOME / tmp / out 2>& 1
#每月第一天下午2:15运行 - 输出邮件发送到paul
15 14 1 * * $ HOME / bin / monthly
#在工作日下午10点运行,annoy Joe
0 22 * * 1-5 mail -s这是10pmjoe%Joe,%%你的孩子在哪里?%
23 0-23 / 2 * * * echo运行23分钟后中午2点,
cron
会定期运行命令,如果你只想运行一次,你需要在
,参见
例如
at -f myscript.sh 2:00 7月13日
I'm trying to find the best solution for scheduling uploads to my server to specific directories.
- initially uploading the content
- pushing it live at the defined time
I've heard cron job recommended, but I've no idea how to use such a thing.
I'm trying to upload .html, .php, and .jpg files to multiple different directories all at the same future time.
I'm using Linux, cPanel, PHP. Typical LAMP stack + cPanel.
Any input is appreciated.
cron is really easy. To edit the jobs type
crontab -e
This will give you a blank file with comments explaining its structure.You use numbers with wild cards to say when to run things, and then what to run.For example, from this page,
# run five minutes after midnight, every day
5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1
# run at 2:15pm on the first of every month -- output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
23 0-23/2 * * * echo "run 23 minutes after midn, 2am,
cron
will run the command regularly. If you just want it to run once, you need at
. See heree.g.
at -f myscript.sh 2:00 july 13
这篇关于计划上传的解决方案 - cron工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!