Article 5G6TY Cronjob not executed despite all trial (& errors)

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 appreciatedlatest?d=yIl2AUoC8zA latest?i=bRgWY2a5gmg:Xu210zgiF-4:F7zBnMy latest?i=bRgWY2a5gmg:Xu210zgiF-4:V_sGLiP latest?d=qj6IDK7rITs latest?i=bRgWY2a5gmg:Xu210zgiF-4:gIN9vFwbRgWY2a5gmg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments