Answer the question
In order to leave comments, you need to log in
How to execute groovy script through scheduler?
Hello! How to schedule Groovy script execution via CRON?
Create line:
25 08 * * * root /bin/sh -c cd /home/scripts/ && groovy test.groovy
Gives an error:
/bin/sh: 1: groovy: not found
Although if you run the crypt itself in the console: groovy test .groovy works.
Answer the question
In order to leave comments, you need to log in
standard answer: because CRON has a different environment.
from your user run
which groovy
get something like /usr/local/bin/groovy
and put that in place of groovy in cron.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question