//============================================================================= // // Task: SYNC-MOD.TSK // (Triggers synchronization based upon detection of file no longer in use) // Author: Avanti Technology, Inc. // Modified: Duane Fish, NetWorking Plus of Illinois // http://www.avanti-tech.com // Version: 1.0 - Initial Release // (30 May 2005) // // Description: // ============ // Synchronizes the PATCHES directory from server FISH1 to server FISH2 // Note that the servers are in separate trees and are of different NetWare // versions. These files could be applications, data, or anything you choose. // This is a sample Synchronization task to give you an idea of how it works. // // Objective: // ========== // Keep the PATCHES directory synchronized across servers. This will run // every evening at 7pm, but can be ran manually at any time. // // Usage: // ====== // Script can be manually executed using the TaskMaster TMRUN command // at the TMConsole (Shell) Screen: // // Example: TMRUN [vol:path\]SYNC-PAT.TSK // // Note: [vol:path\] is not required if the task resides either // in SYS:SYSTEM or the TaskMaster NLM load directory. // // Script can be scheduled for automatic execution using Client interface or // using the TaskMaster TMSCHEDULE command at the TMConsole (Shell) Screen: // // Examples: TMSCHEDULE ADD SYNC-PAT.TSK 01 02:00 // (Executes the 1st of each month at 2:00am) // // TMSCHEDULE ADD SYNC-PAT.TSK YNNNNNN 02:00 // (Executes every Sunday [SMTWTFS] at 2:00am) // // TMSCHEDULE ADD SYNC-PAT.TSK YYYYYYY 19:00 // (Executes every day [SMTWTFS] at 7:00pm) // // // Note: Scheduled tasks must reside either in SYS:SYSTEM or the // TaskMaster NLM load directory for security reasons. // // Once executed, the task runs continuously until the Server is downed, the // TaskMaster NLM is unloaded, or the task is aborted. Logic at the start of // the task checks to make sure that only one instance of the task is running. // // Compatibility: // ============== // This task has been tested on the following platforms without demonstrating // any compatibility issues or any other reported/confirmed conflicts: // TaskMaster v4.04 (or later) // NetWare v3.12 / v3.2 / v4.1x / v4.2 / v5.x / v6.x // // Warning: // ======== // AS WITH ANY NEW SOFTWARE PROGRAM, BATCH SCRIPT, OR AUTOMATED PROCESSING // PROCEDURE, CAUTION SHOULD BE EXERCISED AND DUE DILIGENCE OBSERVED DURING // INITIAL IMPLEMENTATION. WHERE POSSIBLE, TESTING SHOULD BE PERFORMED ON // NON-PRODUCTION SYSTEMS PRIOR TO FULL IMPLEMENTATION. // // Comments: // ========= // This task script is provided free of charge and without any warranty or // guarantee of fitness of purpose or performance. // // For additional TaskMaster script examples, visit the Sample Tasks page // on the Avanti Technology, Inc. WEB Site: http://www.avanti-tech.com // //============================================================================= // Check that the version of TaskMaster loaded is compatible (4.04 or later) IF "%TM_VERSION%.%TM_SUBVERSION%%TM_REVISION%"<"4.04" // Echo the problem message to the screen ECHO. ECHO Error: Incompatible TaskMaster release (requires v4.04 or later)! ECHO. ABORT ENDIF // Check that no other instances of this task are running (Limit: 1 instance) IF ACTIVE_TASK %TASK% // Echo the problem message to the screen ECHO. ECHO Error: %TASK% is already running! ECHO. ABORT ENDIF // Label designating a section of logic or GOTO jump point :START // Define the SYNC output log file (check this log for errors after processing) // Notes: SYNC log file name is same as .TSK file name but with .LOG extension. // DEFINE technique is used to simplify subsequent referencing via %9. // This example SYNCs the SYS:SYSTEM directory to a Remote Failover Server. // // /A (Add) - add new source file(s) to destination // /D (Delete) - delete any destination file(s) not on source // /L (Log) - write the command line and options to redirection output file // /M (Modify) - modified source files copied to destination // /# (Stats) - Include processing statistics in final summary // >>%9 - redirect the console output to the %9 defined file (i.e., log) // // Note: Change source vol:path and destination server/vol:path to customize. SYNC SYS:\PATCHES FISH2/SYS:\PATCHES\ /a /d /l /m /s /#