The following contains instructions on how to schedule a job using the command line.
This is extremely useful for deployment scenarios.
You may also be interested in the ability to use Environment Variables in a backup job script (.NBK) from the help documentation: help.novabackup.com/NovaStor/NovaBACKUP | Advanced Features
The Technical Support team cannot assist you in scheduling a job this way.
Help Info / Manual
C:\Program Files\NovaStor\NovaStor NovaBACKUP>
nsCmd.exe -s C:\BackupPlan\MyBackupScript.nbk -t C:\BackupPlan\XYZbackupSchedule.ini
Where the .ini file would include all the needed things for the schedule to be injected and the .nbk file would be the script that the schedule would be set to run.
Below is some sample parameters and arguments that have already been documented as part of the xSP remote settings.ScheduleName = <name>
- Optional, allows schedule naming per user’s preference. Default is the section name.The BackupSchedule section (time-to-run specification)
Schedule types and associated values are:
ScheduleType = <once / minute / hourly / daily / weekly / monthly>
- Required, specify only oneStartDate = <mm-dd-yyyy>
StartTime = <hh-mm-ss>
- Optional, time is 24 hour format, default is current date and time
MaxRuntime=<hours:mins>
- OptionalParameters associated with each possible schedule type are:
RUN_ONCE;
<no additional params>RUN_MINUTE;
NumMinutes = <number>
NumSeconds = <number>
- Defines the runtime interval by minute and secondRUN_HOURLY;
NumHours = <number>
- Defines the runtime interval by hoursRUN_DAILY;
NumDays = <number>
- Normally 1, meaning to run every dayMon = <boolean, 1 or 0>
Tue = <boolean, 1 or 0>
Wed = <boolean, 1 or 0>
Thu = <boolean, 1 or 0>
Fri = <boolean, 1 or 0>
Sat = <boolean, 1 or 0>
Sun = <boolean, 1 or 0>
- These are defined as days to includeRUN_WEEKLY;
WeekNum = <number>
- Defines the runtime interval by weeksRUN_MONTHLY;
MonthNum = <number>
DayNum = <number>
- Defines the runtime interval by months and day of month
Command Line Help for nscmd.exe
:
C:\>cd\"Program Files\NovaStor\NovaStor NovaBACKUP" C:\Program Files\NovaStor\NovaStor NovaBACKUP>nscmd.exe
Command Line Help:
-u user name
-d domain
-p password
-s script file path
-q allow queuing
-h hide console
-t ini file for scheduled job settings
Examples:
Run a script specifying credentials and queuing
-u John -d MyDomain -p 123 -q -s c:\temp\backup.nbk
-s c:\backupplan\MyBackupScript.nbk -t c:\backupplan\XYZbackupschedule.ini
schedule.ini
Template
Here is the template. This will be saved as an .ini file.
schedule.ini
NOTE: You need to keep the <
>
around the value for this to work, think of them as double-quotes ""
ScheduleName=<name>
ScheduleType=<once / minute / hourly / daily / weekly / monthly>
StartDate=<mm-dd-yyyy>
StartTime=<hh-mm-ss>
MaxRuntime=<hours:mins>
NumMinutes=<number>
NumSeconds=<number>
NumHours=<number>
NumDays=<number>
Mon=<boolean, 1 or 0>
Tue=<boolean, 1 or 0>
Wed=<boolean, 1 or 0>
Thu=<boolean, 1 or 0>
Fri=<boolean, 1 or 0>
Sat=<boolean, 1 or 0>
Sun=<boolean, 1 or 0>
WeekNum=<number>
MonthNum=<number>
DayNum=<number>
Example schedule.ini
ScheduleName=<My Backup>
ScheduleType=<daily>
StartDate=<11-15-2019>
StartTime=<17-12-00>
NumDays=<1>
Mon=<1>
Tue=<1>
Wed=<1>
Thu=<1>
Fri=<1>
Sat=<0>
Sun=<0>