Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

19
LINES

< > BotCompany Repo | #1019696 // Watch Dog [restarts OS when it hangs]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (7143L/38K).

!7

cmodule WatchDog > DynPrintLog {
  transient bool _startMinimized = true;
  
  start {
    if (differentUserHome()) ret with infoBox("Watch dog not yet supported for alternative user home");
    
    doEvery(dm_osLoading() ? 10.0 : 0.0, 60.0, r {
      if (!licensed() || dm_shuttingDown()) ret;
      if (hasBot("Stefan's OS Watch Dog.")) {
        // print("Watch Dog running.");
      } else {
        print("Watch Dog not running, starting.");
        nohupJavax(#1019683);
      }
    });
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 11 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019696
Snippet name: Watch Dog [restarts OS when it hangs]
Eternal ID of this version: #1019696/30
Text MD5: 0e5a3c3b4820e8da1b0bd50d285a355d
Transpilation MD5: eb1035b9c13c7e9a60616f4d6b2b11f8
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-06-22 00:20:41
Source code size: 521 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 394 / 323534
Version history: 29 change(s)
Referenced in: [show references]