Cronjob not executed despite all trial (& errors)
by sainoh from LinuxQuestions.org on (#5G6TY)
Hi, being a total newbie to Debian linux, and being w/o success for hours now, so I am brave now to ask the experts...
I need a simple wget command executed at 11:50p.m. every day
The command, which works perfectly well from the shell of my user (citysensor) is
wget --output-document /home/citysensor/csv/11_lden$(date +%Y-%m-%d_%H:%M:%S).txt "https://xxxxx.xxx/api/getdata?sensorid=11&data=lden&out=csv&span=7"
I used crontab -e to create my cron file, which looks like as follows: (URL anonymized for testing I want it to be executed every even minute)
SHELL=/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
*/2 * * * * wget --output-document /home/citysensor/csv/11_lden$(date +%Y-%m-%d_%H:%M:%S).txt "https://xxxxx.xxx/api/getdata?sensorid=11&data=lden&out=csv&span=7"
I did a reload, /etc/init.d/cron reload - not even sure if it required...
However the wget is not executed, file is not created
I am sure this is a tiny stupid syntax thing but I don't get it
Any help appreciated


I need a simple wget command executed at 11:50p.m. every day
The command, which works perfectly well from the shell of my user (citysensor) is
wget --output-document /home/citysensor/csv/11_lden$(date +%Y-%m-%d_%H:%M:%S).txt "https://xxxxx.xxx/api/getdata?sensorid=11&data=lden&out=csv&span=7"
I used crontab -e to create my cron file, which looks like as follows: (URL anonymized for testing I want it to be executed every even minute)
SHELL=/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
*/2 * * * * wget --output-document /home/citysensor/csv/11_lden$(date +%Y-%m-%d_%H:%M:%S).txt "https://xxxxx.xxx/api/getdata?sensorid=11&data=lden&out=csv&span=7"
I did a reload, /etc/init.d/cron reload - not even sure if it required...
However the wget is not executed, file is not created
I am sure this is a tiny stupid syntax thing but I don't get it
Any help appreciated