In Linux these days, a Java scheduled job is released.ProgramStart to incrementally update the search engine index library at every day, but every time I log on to the server via SSH the next morning, PS-Ef | grep starttimer looks for the process of my scheduled job (starttimer is the class name at the entry point of the main program of My Timer Program ), the result process is gone, and I am wondering, I wrote a start. the sh script is used to start the job and CD it directly to the job directory, and then sudo. /start. sh starts to run, and the console also shows that the quantz job has been started successfully, but the process is no longer in the next day.
Baidu later said that the startup method will end with the exit of SSH. To implement the daemon process, you must use nohup to start it, that is, sudo nohup. /start. sh &, in this way, the SSH client exits and the Job Program is still running. You can view the process tree and pstree and find that the job starts a separate process instead of a SSH sub-process, exiting the index SSH does not end the job process.
Refer to Region