Schedules don't run at all

Product: PowerShell Universal
Version: 1.4.7

I’m running into an issue here with universal - none of my schedules actually run.
I’ve checked through the logs, but I’m not seeing anything of note on this.

I can add schedules just fine, they show up without issue, but nothing ever runs. No jobs get logged.

I setup a simple script that drops a line into a log file. Scheduled to run every minute.
Never runs. i can run it manually, and they are working fine. In fact this is so far the only issue I’m facing.

Any ideas?

EDIT: I’ve upgraded from 1.4.2 to 1.4.7. The same issue still exists. No schedules work at all, and i don’t see anything of note in the logs. I have logging set to Debug for everything.

Can you share your schedules.ps1 file from %ProgramData%\UniversalAutomation\Repository\.universal.?

I’d also be curious what’s going on with your database. It will be in %ProgramData%\UniversalAutomation\database.db.

You can use this to peek inside it: https://github.com/julianpaulozzi/LiteDbExplorer/releases/tag/0.8.6.1

You will have to stop PSU before opening the database.

Thanks Adam.
My schedules.ps1 contains the following right now:

New-PSUSchedule -Cron "0 */4 * * *" -Script "DFS_Monitor.ps1" -TimeZone "America/New_York" -Environment "5.1.17763.1007" 
New-PSUSchedule -Cron "*/30 * * * *" -Script "Dashboard_Service_Accounts_Auto_Resync_From_Thycotic.ps1" -TimeZone "America/New_York" 
New-PSUSchedule -Cron "*/5 * * * *" -Script "Job_Schedule_Test.ps1" -TimeZone "America/New_York"

I would note: The time zone for our servers is actually Pacific.
Might this be related? I’m not positive if/where to change the timezone usage in universal.

What might I be looking for in the database?

just looking over the db here. i noticed that all of the scripts in here are showing “Status: Draft”. Not sure if that’s normal or possibly related.
Below is my simple test script’s DB data:

{
"_id": {"$numberLong": "19"},
"Name": "Job_Schedule_Test.ps1",
"CreatedTime": {"$date": "2020-11-05T22:43:52.2540000Z"},
"ManualTime": 0.0,
"Content": "need_to_hide_for_security",
"Status": "Draft",
"FullPath": "Job_Schedule_Test.ps1",
"ErrorAction": "SilentlyContinue",
"InformationAction": "Continue",
"Verbose": false,
"Debug": false,
"DisableManualInvocation": false,
"MaxHistory": 100
}

also, here’s the data from the Schedule table in the DB:

[
{
    "_id": {"$numberLong": "8"},
    "Cron": "0 */4 * * *",
    "NextExecution": {"$date": "0001-01-01T05:00:00.0000000Z"},
    "Script": 
    {
        "$id": {"$numberLong": "17"},
        "$ref": "script"
    },
    "TimeZoneString": "America/New_York",
    "Continuous": false,
    "Delay": {"$numberLong": "0"},
    "Environment": "5.1.17763.1007",
    "Valid": true
},
{
    "_id": {"$numberLong": "12"},
    "Cron": "*/30 * * * *",
    "NextExecution": {"$date": "0001-01-01T05:00:00.0000000Z"},
    "Script": 
    {
        "$id": {"$numberLong": "3"},
        "$ref": "script"
    },
    "TimeZoneString": "America/New_York",
    "Continuous": false,
    "Delay": {"$numberLong": "0"},
    "Valid": true
},
{
    "_id": {"$numberLong": "14"},
    "Cron": "*/5 * * * *",
    "NextExecution": {"$date": "0001-01-01T05:00:00.0000000Z"},
    "Script": 
    {
        "$id": {"$numberLong": "19"},
        "$ref": "script"
    },
    "TimeZoneString": "America/New_York",
    "Continuous": false,
    "Delay": {"$numberLong": "0"},
    "Valid": true
}
]

There’s a table called Schedules that should contain the same info from the schedules.ps1.

We don’t use the status parameter. It was something we added early on that wasn’t fully implemented.

The time zone specified in the schedules.ps1 should be used so you will have to update that PS1 file if you want to run it in pacific. We use NodaTime for translating time zones so you can find a list here: https://nodatime.org/TimeZones

This is all pretty strange though so if you want to open a case for this, feel free to email support@ironmansoftware.com and we can jump on a call to figure it out.

Thanks Adam.
I’ll look to adjust the schedules in the .ps1

I pasted the schedule data from the DB above there in an edit. It looks exactly the same as the schedules.ps1.

I’ll get an email out to the support there. Thanks for the help!

FYI - If anyone else runs into this issue, I was able to resolve it.
Seems that this was due to upgrading from older versions a couple of times.

in order to fix this, I simply backed up the universal automation scripts, schedules, variables, etc. as well as the authentication scripts.
Did a clean reinstall of 1.4.7 and reimported everything. Sometimes that’s just what it takes!

1 Like