-
- Novice
- Posts: 3
- Liked: never
- Joined: Aug 27, 2015 12:52 pm
- Contact:
Pre-job script behavior in relation to backup jobs
Greetings. Is there a way to prevent a backup job from running if a given condition is true at the scheduled job run-time? For example, if a service is running, or a file exists, etc, can the backup job be aborted or rescheduled? I was thinking the pre-job script could check for the condition no problem, the question is how to abort out or reschedule the current scheduled backup job if the condition is true. Thank you in advance for any suggestions.
-
- Product Manager
- Posts: 20406
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Pre-job script behavior in relation to backup jobs
The idea will be to put into use our PowerShell snap-in. Set a script as a pre-job activity that using the right commandlets either stops or reschedule job. Thanks.
-
- Novice
- Posts: 3
- Liked: never
- Joined: Aug 27, 2015 12:52 pm
- Contact:
Re: Pre-job script behavior in relation to backup jobs
Great thank you for the prompt reply, Vladimir.
Related note: Is there a way to accomplish this same task without the use of PowerShell, in other words, just from a strainght Windows CMD (or BATch) file?
Thanks again for the help!
Related note: Is there a way to accomplish this same task without the use of PowerShell, in other words, just from a strainght Windows CMD (or BATch) file?
Thanks again for the help!
-
- Product Manager
- Posts: 20406
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Pre-job script behavior in relation to backup jobs
It's possible to start job via commandline, using the string provided at the Summary page (Summary -> Command line).
For anything besides that you have to use PowerShell snap-in.
Also, take a look how to make pre/post-job activity work with PS scripts.
Thanks.
For anything besides that you have to use PowerShell snap-in.
Also, take a look how to make pre/post-job activity work with PS scripts.
Thanks.
-
- Novice
- Posts: 3
- Liked: never
- Joined: Aug 27, 2015 12:52 pm
- Contact:
Re: Pre-job script behavior in relation to backup jobs
Awesome, thanks again Vladimir - much appreciated.
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 246 guests