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

29
LINES

< > BotCompany Repo | #1020773 // Daily Backup of JavaX-Data

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

Libraryless. Click here for Pure Java version (18021L/131K).

1  
!7
2  
3  
module DailyBackup > DynEnabled {
4  
  S sendToMachines;
5  
  
6  
  visualize {
7  
    ret centerAndSouthWithMargins(super.visualize(),
8  
      withLabel("Send to machines:", dm_fieldTextField('sendToMachines)));
9  
  }
10  
  
11  
  start {
12  
    doEvery(60.0, 10*60.0, r doIt);
13  
  }
14  
  
15  
  void doIt enter {
16  
    if (!enabled || elapsedHours_timestamp(parseLongOpt(loadProgramTextFile("lastBackup"))) < 23.99) ret;
17  
    
18  
    saveProgramTextFile("lastBackup", str(now()));
19  
    dm_action("Backing up JavaX-Data", r {
20  
      final File f = zipAllDataDirs();
21  
      if (emptyAfterTrim(sendToMachines)) ret;
22  
      dm_action("Sending backup to other machines", r {
23  
        for (S computerID : possibleComputerIDs(javaTokC(sendToMachines))) pcall {
24  
          dm_sendBackupFileToOtherMachine(f, computerID);
25  
        }
26  
      });
27  
    });
28  
  }
29  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, jozkyjcghlvl, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020773
Snippet name: Daily Backup of JavaX-Data
Eternal ID of this version: #1020773/7
Text MD5: 3fe5376820c60464f3489af4aa2ff972
Transpilation MD5: 97c6792d57a73897a86b6e644fd7a67b
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-01-02 01:15:30
Source code size: 832 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 292 / 6047
Version history: 6 change(s)
Referenced in: [show references]