Highlighted
Absent Member.. Absent Member..
Absent Member..
331 views

Schedule problem with DP5.5 and Windows

Jump to solution
Hi,

i would like to schedule a job on every first Monday of each month. This is for archiving backup tapes once a month. But there is no way in the scheduler to do this.
I thought of setting a windows task. Is there a way to start a job by command line?

Any other ideas?

Thanks
Rainer
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.
Hi Rainer!

I know that Leig already answered your question about the scheduler. I allways schedule the archiving jobs with Windows TAsk Scheduler to have them the "first day of month", "fourth day of month" and so on.

I start with the GUI and creates a scheduled object copy job.

Then I create a script that looks like this:
\omniobjcopy.exe -copylist -scheduled

(Where omnibackdirectory is the path til bin directory for DP and copylistname is the name that you give the copyjob see OmniBack\Config\Server\copylists\scheduled for the name. If you have spaces in the name you have to use "" in the script)

Then in task scheduler create a task to start the script.

Good luck

//Mats

View solution in original post

12 Replies
Highlighted
Absent Member.
Absent Member.
Hi,
There is actually no way to configure the DP scheduler as you specify. You have to use a different scheduler. Have a look at the Windows "AT" command.
Highlighted
Absent Member.
Absent Member.
Hi Rainer!

I know that Leig already answered your question about the scheduler. I allways schedule the archiving jobs with Windows TAsk Scheduler to have them the "first day of month", "fourth day of month" and so on.

I start with the GUI and creates a scheduled object copy job.

Then I create a script that looks like this:
\omniobjcopy.exe -copylist -scheduled

(Where omnibackdirectory is the path til bin directory for DP and copylistname is the name that you give the copyjob see OmniBack\Config\Server\copylists\scheduled for the name. If you have spaces in the name you have to use "" in the script)

Then in task scheduler create a task to start the script.

Good luck

//Mats

View solution in original post

Highlighted
Absent Member.
Absent Member.
Hi,

When scheduling the backup directly from the scheduled task it will keep the task open untill the backup finishes. To avoid this (and to be able to start one backup after another finishes) i use this script:

:: Script to schedule a backup job
:: to start in 10 minutes
::
:: 15/02/2006 - Brenn Oosterbaan
::
:: v1.0

:: Set time in variables
FOR /F "TOKENS=1-3 DELIMS=: " %%A IN ('TIME/T') DO (
SET uur=%%A
SET min=%%B
SET ampm=%%C
)

:: remove the leading zero
set /a uur=1%uur%-100
set /a min=1%min%-100

:: Convert to 24 hour notation in case am/pm is used
IF %ampm%M ==PMM IF %uur% NEQ 12 (SET /A uur=%uur%+12)

:: Start the job in 10 minutes
Set /A min=%min%+10

IF %min% GEQ 60 (
SET /A min=%min%-60
SET /A uur=%uur%+1
)
IF %uur% EQU 24 SET uur=00

::main
AT %uur%:%min% cmd /c "w:\APPS\Omniback\Bin\omnib.exe -datalist %1%"

just put the text in a .cmd file and call it using:
scriptname.cmd backupjobname

so if you put this in a backup as a post exec you can have it start the next backup in 10 minutes. that way they will have seperate session logs etc.
Highlighted
Absent Member.
Absent Member.
Is it that hard to click on the first Monday of each month and hit add?

Or just edit the schedule file directly. A full on day X at time Y is simply:

-full -only 2006 -day 22 -month Sep -at 09:30

So put in twelve lines and fix the dates.

You'll have to refresh this every twelve months since DP has no "first day-of-the-week of the month" construct, but that's hardly a big deal for one backup.

Thanks,
Scott
HP Support
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..
shall we be expecting this "last/first/1st/2nd/3rd day of the month" construct in DP6?

For now, the neater solution is to use the windows cron.
Surviving IT from within.
0 Likes
Highlighted
Absent Member.
Absent Member.
I have 28 different backup definitions in various DP cells at various clients. As they all have the same requirement (to run a special job the first Monday of the month) there are 28 different definitions to edit, and 12 months to configure for each one.

Yes, this IS a big deal. Why don't HP FIX IT?!?!?!

Surely it wouldn't be a big deal!
0 Likes
Highlighted
Absent Member.
Absent Member.
Hi Rainer,

You could edit the schedule file directly and add something like this.


-full
-every
-day Mon
-at 04:00
-full
-exclude
-day 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
-at 04:00

""Please omit the & in the schedule file.

This will execute the backup on first Monday of every month.

Please give it a try.

Best regards,
Raja.
0 Likes
Highlighted
Absent Member.
Absent Member.
Hi Rainer,

The way that I deal with such issues is to have a job that runs every monday.

The first thing it would do would be to check if this is the first Monday of the month.

If it is then do whatever it is you want to do. If not then exit.

If it is a backup then use omnib.

If it is a copy then use omniobjcopy.

Jeremy
0 Likes
Highlighted
Absent Member.
Absent Member.
Hi Folks,

You really have to try my method. Eventhough the GUI is quite weak, it's much more flexible when you edit the schedules directly using notepad.

It does not require any special / complex scripting.

For filesystem backups edit the schedule file found in :

Win32 : C:\Program Files\OmniBack\Config\server\Schedules

*Nix : /etc/opt/omni/server/schedules

You may replace your schedule with the content of my attachment. It will set your backup to run on every first Monday of the month at 22:30

Regards,
Raja.

* Please assign some points



0 Likes
Highlighted
Absent Member.
Absent Member.
Tawaraja,

Your method is interesting, but do you know how to exclude ONE day in the month?

Example: We do incremental backups Mon - Thu, Full on Friday, but the first FULL of each month (First Friday) must be a Monthly, which really just means the Protection changes.

So, I'd need to create one job/schedule that handles the daily and weekly, but how do I tell it to omit the first Friday in the month to allow the Monthly job/schedule to run?

Thanks.
0 Likes
Highlighted
Absent Member.
Absent Member.

>> Example: We do incremental backups Mon - Thu, Full on Friday, but the first FULL of each month (First Friday) must be a Monthly, which really just means the Protection changes.

>>So, I'd need to create one job/schedule that handles the daily and weekly, but how do I tell it to omit the first Friday in the month to allow the Monthly job/schedule to run?

I solved that in my previous job..
Why not just schedule a job to change the protection of the first FULL to permanent?

/opt/omni/bin/omnidb -session $i -change_protection weeks 8

omnidb -session ${SESSID} -change_protection weeks 8

Protection = none | days n | weeks
n | until Date | permanent

Rob...
IF you do it more than twice, write a script.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.