Hi, I've got a script creating backup jobs with all the options I want but I cannot find how to set the flag which is in the GUI with the text " Run the job automatically".
Note that the $job.EnableScheduler() and $job.DisableScheduler() functions do the equivalent of the GUI right-clicking on a job and toggling the "Disable" tick box. This is not the same.
If I manually set the flag: Select job -> Edit -> Next -> Next -> Next -> Next -> [x] Run the job automatically -> Finish
Then the $job.DisableSheduler() function does the above *AS WELL* as clearing the flag.
But the $job.EnableScheduler() function *ONLY* does the above and does NOT set this flag.
Anyone know how to set this flag from PowerShell?
-
- Novice
- Posts: 3
- Liked: never
- Joined: Nov 01, 2012 12:07 pm
- Full Name: Phill Rogers
- Contact:
-
- Enthusiast
- Posts: 94
- Liked: 6 times
- Joined: Apr 21, 2011 7:37 pm
- Contact:
Re: "Run the job automatically"
It is with the scheduling options. You can pick apart this function to use the piece you need > Function for setting backup job options
-
- Novice
- Posts: 3
- Liked: never
- Joined: Nov 01, 2012 12:07 pm
- Full Name: Phill Rogers
- Contact:
Re: "Run the job automatically"
I thought I posted this yesterday but must have got lost. Anyway ..
Thanks for the code. Yours worked fine so I cut it down to the absolute minimum then compared with mine line by line.
Eventually found that I was missing the ..
$vbrjoboptions.JobOptions.RunManually = $false
.. which I had in earlier versions but must have cut it somewhere in the edit. Doh!
Thanks.
Thanks for the code. Yours worked fine so I cut it down to the absolute minimum then compared with mine line by line.
Eventually found that I was missing the ..
$vbrjoboptions.JobOptions.RunManually = $false
.. which I had in earlier versions but must have cut it somewhere in the edit. Doh!
Thanks.
Who is online
Users browsing this forum: Bing [Bot] and 19 guests