Keep scheduled java task running after user logoff

In the batch file for running the java program, you should specify the java start argument with -Xrs. For example:

javaw -Xrs -jar  shceduled.jar

Java intercepts user logoff events and stops execution. This is solved by adding -Xrs to the command line running the application, causing the JVM to ignore the logoff event.

留言

這個網誌中的熱門文章

java.lang.NoClassDefFoundError: org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl$Parser

10 Tips for Proper Application Logging

Turn off WebLogic basic authentication