I am trying to add a script to cron jobs to be played daily.
I tried multiple things but no one seems to work.
First I tried to add a script in cron.daily: It s not triggered.
#!/bin/sh
cd ~/foo/
/usr/bin/mvn exec:java -Dexec.mainClass="bar.foo.Main" > ~/foo.log
Then I tried to add a line in crontab using vi crontab same thing
17 * * * * root cd ~/foo/ && /usr/bin/mvn exec:java -Dexec.mainClass="bar.foo.Main" > ~/foo.log
Then I tried to use crontab -e and add the same line than before : nothing.
It s the first time I tried to launch a periodic script... Is there something to restart?
PS : Why vi crontab and crontab -e don't display the same thing?