@@ -27,27 +27,34 @@ static void Main(string[] args)
2727 {
2828 var cleanJob = FileCleanJobOptionsBuilder . CreateBuilder ( )
2929 . WithDestinationPath ( "temp" )
30- . WithInterval ( TimeSpan . FromMinutes ( 20 ) )
31- . WithMaxAge ( TimeSpan . FromDays ( 500 ) )
30+ . WithInterval ( TimeSpan . FromMinutes ( 21 ) )
31+ . WithMaxAge ( TimeSpan . FromDays ( 30 ) )
3232 . WithMinimumFreeSpaceMegabytes ( 1024 * 30 )
3333 . Build ( ) ;
3434 jobOptions . Add ( "CleanJob" , cleanJob ) ;
3535
36- var syncJobOption = FileSyncJobOptionsBuilder . CreateBuilder ( )
36+ var syncFromEdgeToLocal = FileSyncJobOptionsBuilder . CreateBuilder ( )
3737 . WithSourcePath ( "\\ \\ 192.168.214.240\\ share\\ hri\\ production" )
3838 . WithDestinationPath ( "temp" )
3939 . WithFileSyncProvider ( SyncProvider . SMBLib )
40-
40+ . WithSubfolder ( "left" )
41+ . WithSubfolder ( "right" )
4142 . WithCredentials ( new System . Net . NetworkCredential ( "USER" , "Password" , "" ) )
42- . WithInterval ( TimeSpan . FromMinutes ( 15 ) )
43- /*
44- .WithSearchPattern("*.*")
45- */
43+ . WithInterval ( TimeSpan . FromMinutes ( 10 ) + TimeSpan . FromSeconds ( 25 ) )
4644 . SyncRecursive ( true )
47-
4845 . Build ( ) ;
49- jobOptions . Add ( "SyncJob " , syncJobOption ) ;
46+ jobOptions . Add ( "SyncFromEdgeToLocal " , syncFromEdgeToLocal ) ;
5047
48+ var syncFromLocalToRemote = FileSyncJobOptionsBuilder . CreateBuilder ( )
49+ . WithSourcePath ( "temp" )
50+ . WithDestinationPath ( "Z:\\ Serienspektren_Import\\ 53600002" )
51+ . WithFileSyncProvider ( SyncProvider . FileIO )
52+ . WithInterval ( TimeSpan . FromMinutes ( 15 ) )
53+ . DeleteAfterBackup ( false ) //sonst werden die Daten wieder neu von der Edge geholt
54+ . SyncRecursive ( true )
55+ . Build ( ) ;
56+ jobOptions . Add ( "SyncFromLocalToRemote" , syncFromLocalToRemote ) ;
57+
5158 var json = JsonConvert . SerializeObject ( jobOptions , Formatting . Indented , jsonSettings ) ;
5259 File . WriteAllText ( "config.json" , json ) ;
5360 }
0 commit comments