How to start and kill the procedure?
I have some runnable-jar files. I want to run them at regular intervals and also kill those processes after some time. I am a newbie when it comes to Ubuntu or linux in general. Can anybody suggest me...
View ArticleAnswer by rahmu for How to start and kill the procedure?
The best way would be to create a shell script that runs the the executable, retrieves the PID of the process then kill it after a certain amount of time. You can then add this as a job in your crontab...
View ArticleAnswer by Matthias Braun for How to start and kill the procedure?
This sounds like a job for cron.
View ArticleAnswer by Thomas for How to start and kill the procedure?
Use something like#!/bin/bashjava -jar <name-of-the-jar-file> &javapid=$!sleep <some-time-in-seconds>kill $javapidin a file, make it executable (chmod +x ) and run it...
View ArticleAnswer by Saurabh for How to start and kill the procedure?
For killing a process using kill command, we have to keep track of PID of the process to be killed. So, we have used pkill -f to kill the process. Now, I only have to remember the name of process and...
View Article