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


Can I use wget to run a local file as a cron job using relative path above public_html?

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

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

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

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

这行得通吗?还是另一个命令比wget更好?

最好的命令是php /home/account/invest/controllers/cron_controller.php