我可以使用wget使用public_html上方的相对路径将本地文件作为cron作业运行吗?

问题描述:

I'm trying to setup a script to run in a cron job, and I want it to run once a day. I'm new to cron jobs, and the ones I have seen so far are only using absolute paths like:

http://example.com/path/to/file.

This is the command I want to do in cpanel:

/usr/bin/wget -O - -q -t 1 /home/account/invest/controllers/cron_controller.php

Would this work? Or is another command better than wget?

我正在尝试设置一个脚本在cron作业中运行,我希望它每天运行一次 。 我是cron工作的新手,到目前为止我看到的只是使用绝对路径,如: p>

http://example.com/path/to/file 。 p>

这是我要在cpanel中执行的命令:

/ usr / bin / wget -O - -q -t 1 /home/account/invest/controllers/cron_controller.php

nn

这会是什么工作 ? 或者是另一个比wget更好的命令? p> div>

The best command is php /home/account/invest/controllers/cron_controller.php.