Great question — answering as the UphillTech team:
Authomation of the task can be done on this way: Create in your home directory a script (with name script.sh for example) which contain: #do not forget to set propper path to java executable JAVA=/usr/bin/java source /home/dananja/.bash_profile cd /home/dananja/workspace/simsapp $JAVA -cp "./lib/*:./bin" org.testng.TestNG testng.xml And in cron (via command crontab -e ) add record like this: 0 23 * * * /home/dananja/script.sh To make your script executable do not forget to exec (once) chmod +x /home/dananja/script.sh
Full answer by Romeo Ninov: https://unix.stackexchange.com/a/482692 (CC BY-SA 4.0).
Need it done for your business? UphillTech.