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.

留言

這個網誌中的熱門文章

Disable ionic's sidemenu content drag to toggle menu

Multiple writable mappings exist for the field. Only one may be defined as writable, all others must be specified read-only.

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