Running long running tasks/java process

Is it possible to run long running task without killing it, I did try async fire-forget but it still requires to enter time?

Or let me ask it this way, How do i run a java app on machines, for which i might need to change parameters when i start it off.

basically kickoff a java process (jar) with some parameters, if i wish to change it, kill the java process running and restart with new parameters. This is for our dev environment.

I would either make an init script, or just use nohup and record/find the pod to stop it when restarting.

Brian Coca

I actually did try command/shell both with nohup

action: shell nohup /usr/bin/java -jar kk.jar arg1 arg2 &
action: command nohup /usr/bin/java -jar kk.jar arg1 arg2 &

It still does not seem to go to the next task, Only when i kill java on remote machine does it proceed,

Is it possible to run long running task without killing it, I did try async
fire-forget but it still requires to enter time?

Just set the time to some very high value, like a day or two.

Or let me ask it this way, How do i run a java app on machines, for which i
might need to change parameters when i start it off.

basically kickoff a java process (jar) with some parameters, if i wish to
change it, kill the java process running and restart with new parameters.
This is for our dev environment.

If you want to do something that runs forever, it seems you should
write a service init script.

Thank you very much, for now I will just set it as a Day and also look at writing an init script and also reading a config file, As i need to change parameters.

One last question in this thread, When i run a playbook in async mode, I do not get the job id, But i can go on the remote node and find it. Is there a way i can kill the jobs by jobid, I did try async_status mode cleanup, But that does not kill the long running task,

Thanks for the help!!