[英]Cron job using codeigniter on an ubuntu server
I'm having trouble setting up a cron job. 我在设置Cron工作时遇到问题。
I have a cron job created at a url like so: 我在这样的网址上创建了cron作业:
myurl.com/cron myurl.com/cron
When that link is accessed, it is run. 访问该链接后,它将运行。
How do I set it so that it runs automatically, every 10 minutes? 如何设置它,使其每10分钟自动运行一次?
I can't figure out how to create a cron job. 我不知道如何创建一个cron作业。 I know that that's what I need to do, but I can't figure out how to do it for a ubuntu server.
我知道那是我需要做的,但是我不知道如何为Ubuntu服务器做这件事。
Login via SSH and in the shell, type the following: 通过SSH登录,然后在Shell中键入以下内容:
crontab -e
Then, place the following line: 然后,放置以下行:
*/10 * * * * /path/to/command
Save the file and that command will be called every 10 minutes. 保存文件,该命令将每10分钟调用一次。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.