I have a java app that i start with a shell script:
#!/bin/bash
java -Dfile.encoding=UTF-8 -classpath $(echo classes/* | tr ' ' ':') bg.nemetschek.emailsautomation.MarketplaceAutomation
The cron i did was with a regular file mycron
:
0 12 * * * /bin/bash /home/devadmin/email/marketplaceAutomation.sh
Then i added it into cron jobs:
crontab mycron
Then crontab -l
shows me that the task is in. I do a sudo service cron restart
just in case. If i run the command manually everything works as intended.
I did sudo chmod -R 777 /home/devadmin/email/
and sudo chmod +x /home/devadmin/email/marketplaceAutomation.sh
And even then the task is not executing and there is no log so it just looks like it didn't even start to execute it. I tried to >
the output from the cron to a file but nothing shows up (no output maybe).
This is my syslog:
devadmin@vm-jira-prd4:~/email$ sudo cat /var/log/syslog
Dec 5 07:17:01 vm-jira-prd4 CRON[32224]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Dec 5 07:57:28 vm-jira-prd4 dhclient[579]: DHCPREQUEST of 192.168.180.31 on ens192 to 192.168.180.242 port 67
Dec 5 07:57:28 vm-jira-prd4 dhclient[579]: DHCPACK of 192.168.180.31 from 192.168.180.242
Dec 5 07:57:28 vm-jira-prd4 dhclient[579]: bound to 192.168.180.31 -- renewal in 7379 seconds.
Dec 5 08:17:01 vm-jira-prd4 CRON[32433]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Dec 5 09:17:01 vm-jira-prd4 CRON[32706]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Dec 5 10:00:27 vm-jira-prd4 dhclient[579]: DHCPREQUEST of 192.168.180.31 on ens192 to 192.168.180.242 port 67
Dec 5 10:00:27 vm-jira-prd4 dhclient[579]: DHCPACK of 192.168.180.31 from 192.168.180.242
Dec 5 10:00:27 vm-jira-prd4 dhclient[579]: bound to 192.168.180.31 -- renewal in 7252 seconds.
Dec 5 10:17:01 vm-jira-prd4 CRON[892]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Dec 5 11:17:01 vm-jira-prd4 CRON[1460]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Dec 5 12:00:01 vm-jira-prd4 CRON[1958]: (devadmin) CMD (/bin/bash /home/devadmin/email/marketplaceAutomation.sh)
Dec 5 12:00:01 vm-jira-prd4 CRON[1957]: (CRON) info (No MTA installed, discarding output)
Dec 5 12:01:19 vm-jira-prd4 dhclient[579]: DHCPREQUEST of 192.168.180.31 on ens192 to 192.168.180.242 port 67
Dec 5 12:01:19 vm-jira-prd4 dhclient[579]: DHCPACK of 192.168.180.31 from 192.168.180.242
Still no idea why it doesn't work.
OS: NAME="Debian GNU/Linux"
VERSION_ID="9"
Comments
Post a Comment