|
Using command line parameters to control OCB |
Top Previous Next |
|
Using command line parameters to control OCB Command line parameters add commands and presets to the scheduler. To run presets immediately, give their names in the command line. If a preset has spaces in it's name, wrap it in quotation marks. Example:
ocb.exe "My main documents" "Other documents" Additional commands: all advanced commands + /hide, /schon, /schoff:
/hide - make OCB hide to the system tray when it starts. /schon - turn scheduler on. /schoff - turn scheduler off. All commands following /schoff, including /exit, will be delayed until you enable the scheduler, so it is not recommended to use any other commands after /schoff. Note: you cannot use /schon and /schoff if OCB is already running.
Example: "ocb.exe /hide mydocs /exit" This will make OCB hide to the system tray, execute all delayed tasks, execute "mydocs" and exit.
Command extensions. Previous example scheduled presets at once with the default settings. Default settings are: Date and time: now; Repeat: 0; Interval: 1; Precise: 1 (checked); Delayed execution: 0 (Run ASAP). By using extensions you can run a command or a preset with new settings. The extensions are wrapped in square brackets and given right after the command without spaces. You can use several extensions. The extension name and its value are divided by the "=" symbol. The list of extensions: date - set date and time in correct format: YYYY.MM.DD HH:MM:SS. There is a space between date and time, use 24-hour format. repeat - set repeat counter (from -1). interval - set interval counter (from 1). precise - set precise checkbox (0 - off, 1 - on). ondelay - set delayed execution type (0 - ASAP, 1 - skip, 2 - remove). Warning: if an extension is not given or its value is incorrect, the default value will be used. Examples: ocb.exe "docs[date=2005.10.19 20:00:00][interval=60][precise=0]" "photos[repeat=10][interval=1440]". This command line starts two presets - docs and photos. Docs will start at 20:00 while photos will start immediately. ocb.exe "/shutdown[date=2005.10.20 23:00:00]" This command will make OCB shutdown the computer at 23:00. Note, that we use quotation marks because the date has a space char. ocb.exe "/execsync(c:\program files\myprog\myprog.exe)[date=2005.10.20 23:00:00][interval=1440]" This command will make OCB run c:\program files\myprog\myprog.exe at the given time every day and the first execution will occur on 2005.10.20.
SEE ALSO:
|