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).

1  
!7
2  
3  
cmodule WatchDog > DynPrintLog {
4  
  transient bool _startMinimized = true;
5  
  
6  
  start {
7  
    if (differentUserHome()) ret with infoBox("Watch dog not yet supported for alternative user home");
8  
    
9  
    doEvery(dm_osLoading() ? 10.0 : 0.0, 60.0, r {
10  
      if (!licensed() || dm_shuttingDown()) ret;
11  
      if (hasBot("Stefan's OS Watch Dog.")) {
12  
        // print("Watch Dog running.");
13  
      } else {
14  
        print("Watch Dog not running, starting.");
15  
        nohupJavax(#1019683);
16  
      }
17  
    });
18  
  }
19  
}

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: 496 / 360499
Version history: 29 change(s)
Referenced in: [show references]