我想要将以下的wget cron命令改为curl格式:
wget https://www.yoursite.com/index.php?route=cronjob/cronjob -O /dev/null
wget --quiet --delete-after "http://www.yoursite.com/index.php?route=cron/abandoned_cart_reminder&secret_code=yourcode"
谢谢!
我想要将以下的wget cron命令改为curl格式:
wget https://www.yoursite.com/index.php?route=cronjob/cronjob -O /dev/null
wget --quiet --delete-after "http://www.yoursite.com/index.php?route=cron/abandoned_cart_reminder&secret_code=yourcode"
如果你只想从URL下载一些东西,命令wget
和curl
可以(相当)相似地使用。请注意,下面的内容在每个命令的man
文档中都有。
语法
wget [options] [URL]
curl [options] [URL]
选项
为了指定下载位置,wget
使用 -O
,而 curl
使用 -o
。
为了静音输出,wget
使用 --quiet
,而 curl
使用 --silent
。
为了在完成后删除下载的每个文件,wget
使用 --delete-after
。我不认为 curl
有相关选项(或者可能会自动执行此操作)。
因此,您第一个命令的直接翻译将是:
wget https://www.yoursite.com/index.php?route=cronjob/cronjob -O /dev/null
curl https://www.yoursite.com/index.php?route=cronjob/cronjob -o /dev/null
明白了吗?
在线上有很多例子和每个命令的man
页面上有详尽的文档。这里有很多例子。