So I'm trying to run a wget
command using crontab every 5 minutes. My problem that I have is it's just not running. I did crontab -l
to see what was running, the command is there.
the command is: wget --output-document="/Users/proudowner/Desktop/tfgo/bp.json" http://backpack.tf/api/IGetMarketPrices/v1/?key=<key>
And the error log says: /bin/sh: wget: command not found
The command also runs fine without crontab
.
In crontab -e
, make this your first line:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Then wget
should work without specifying the full path.
You can also just specify the full path to wget
(which wget
to find it):
/usr/bin/wget --output-document="/Users/proudowner/Desktop/tfgo/bp.json" http://backpack.tf/api/IGetMarketPrices/v1/?key=55085a94ba8d88d1538b4576
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With