The following contains instructions on how to schedule a job using the command line.
This is extremely useful for deployment scenarios. The NovaStor 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\natesbackup.nbk -t c:\backupplan\natesbackupschedule.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 one
StartDate = <mm-dd-yyyy>
StartTime = <hh-mm-ss>
- Optional, time is 24 hour format, default is current date and time
Parameters 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 second
RUN_HOURLY;
NumHours = <number>
- Defines the runtime interval by hours
RUN_DAILY;
NumDays = <number>
- Normally 1, meaning to run every day
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>
- These are defined as days to include
RUN_WEEKLY;
WeekNum = <number>
- Defines the runtime interval by weeks
RUN_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
----
Template
Here is the template. This will be saved as an .ini file.
schedule.ini
ScheduleName=<name>
ScheduleType=<once / minute / hourly / daily / weekly / monthly>
StartDate=<mm-dd-yyyy>
StartTime=<hh-mm-ss>
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
ScheduleName=<My Backup Name>
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>