0

I have this command I want to run once every day with my QNAP NAS (linux):

wget 'http://url.link' -O catalog/output.file

In terminal it works fine and the file is downloading but when adding it to crontab it doesn´t download.

I have tried this line in crontab:

08 20 * * * wget 'http://url.link' -O catalog/output.file

Can someone help me why this isn´t downloading at 20.08?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
lovefall
  • 21
  • 2
  • The environment in `crontab` is different from that in a terminal. Try putting full paths to both `wget` and `output.file`, and redirect output to a log file by adding `>>/FullPath/wget.log 2>&1` to the `crontab` entry. – AFH Oct 24 '17 at 18:26

1 Answers1

0

Use:

crontab /etc/config/crontab && /etc/init.d/crond.sh restart
TomEus
  • 3,657
  • 18
  • 35
lovefall
  • 21
  • 2
  • @lovfall I have no idea why your setup requires you to init `crontab` like this, but this is really not the way it’s done nowadays. Typically it would be something like `sudo service crontab restart` and such. – Giacomo1968 Oct 24 '17 at 22:32