Php 设置要在day cron作业的特定时间事件上执行的url

Php 设置要在day cron作业的特定时间事件上执行的url,php,linux,Php,Linux,我已经安装了Linux和PHP 我想设置将在上午11:00执行的cron作业 我们可以使用crontab命令添加cron作业 time of execution /usr/bin/php /var/www/html/somefile.php 我有使用文件路径添加cron作业的经验,但现在我需要使用一些查询参数在cron作业中添加文件url 差不多 time of execution /usr/bin/php www.example.com/somefile.php?do=sometask&am

我已经安装了Linux和PHP

我想设置将在上午11:00执行的cron作业

我们可以使用crontab命令添加cron作业

time of execution /usr/bin/php /var/www/html/somefile.php
我有使用文件路径添加cron作业的经验,但现在我需要使用一些查询参数在cron作业中添加文件url

差不多

time of execution /usr/bin/php www.example.com/somefile.php?do=sometask&with=me
我也用url尝试了上述方法,但它没有执行

请建议
但是有很多选择。您可以使用
curl


/usr/bin/curl www.example.com/somefile.php?do=sometask&with=me&>/dev/null

您不能设置
wget吗http://www.example.com/somefile.php?do=sometask&with=me
在crontab中?例如,创建一个HTTP请求。@jensgram:你能再解释一下吗?@jensgram
11***wgethttp://www.example.com/somefile.php?do=sometask&with=me
如果您决定使用
wget
,这是否正确,您应该使用以下参数:
wget-q-O-http://www.example.com/somefile.php?do=sometask&with=me &>/dev/null
@Let\u Me\u Be:谢谢,如果没有启用curl,会发生什么?有没有其他方法不需要其他东西来启用/禁用?我真的不明白你所说的启用/禁用是什么意思。你很难找到一个没有安装
curl
(或
wget
)的系统。如果是的话,这些程序总是在主系统存储库中,所以安装它们应该不会有任何问题。+1很好的答案这两种方法都起作用,你能在你的答案中添加wget方法,以便用户可以选择其中一种吗