PowerShell script exchange
Post Reply
marius roma
Veteran
Posts: 459
Liked: 5 times
Joined: Feb 01, 2012 12:04 pm
Full Name: Mario
Contact:

Getting detailed schedule for jobs

Post by marius roma »

I need to get the schedule for each job in a format easy ro be read, for example:

--> At 20:00 PM every Monday, Friday and Saturday
or
--> At 5:30 AM Everyday
or
--> After job "Other_backup_job"

How can I get such information via PowerShell and format it in a readable way?
Is there any saplne I can start from?
Regards
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting detailed schedule for jobs

Post by veremin »

As a first step I'd recommend taking a look at this script that I've created before; might be helpful. Thanks.
marius roma
Veteran
Posts: 459
Liked: 5 times
Joined: Feb 01, 2012 12:04 pm
Full Name: Mario
Contact:

Re: Getting detailed schedule for jobs

Post by marius roma »

Thank you, but...

Information
You are not authorised to read this forum.

Regards
Marius
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Getting detailed schedule for jobs

Post by veremin »

Didn't realize that I'd posted the script on our internal forum. That's it:

Code: Select all

Asnp VeeamPSSnapin
function Set-Culture([System.Globalization.CultureInfo] $culture)
{
    [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture
    [System.Threading.Thread]::CurrentThread.CurrentCulture = $culture
}
Set-Culture "en-US"
Get-VBRJob | ?{($_.ScheduleOptions.NextRun | Get-Date -Format "dd.MM.yyyy") -eq (Get-Date -Format "dd.MM.yyyy")} | Sort-Object {$_.ScheduleOptions.NextRun} | Select {$_.ScheduleOptions.NextRun}, name  
Thanks.
marius roma
Veteran
Posts: 459
Liked: 5 times
Joined: Feb 01, 2012 12:04 pm
Full Name: Mario
Contact:

Re: Getting detailed schedule for jobs

Post by marius roma »

Many thanks!
marius
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests