Hi,
Version : 2026.3.2
I’m having a problem with the apps. I have two systems: the production environment (licensed) running MS Server 2022 (english, latest updates) with German language settings but the English number format, and the test/development environment (properly licensed) running Windows Server 2025 (also in english with latest updates installed). Both access their respective SQL 2025 databases. The apps work without issues on the test system. However, when I move them to production, I immediately get the message: "The app is not yet available on this server node. Please refresh in a moment." Upon restarting the app, I get the message:
CRON expression is invalid. Please see the inner exception for details. (Parameter 'cronExpression')
at Hangfire.RecurringJobManager.ValidateCronExpression(String cronExpression) in C:\projects\hangfire-525\src\Hangfire.Core\RecurringJobManager.cs:line 162
at Hangfire.RecurringJobManager.AddOrUpdate(String recurringJobId, Job job, String cronExpression, RecurringJobOptions options) in C:\projects\hangfire-525\src\Hangfire.Core\RecurringJobManager.cs:line 104
at Hangfire.RecurringJobManagerExtensions.AddOrUpdate[T](IRecurringJobManager manager, String recurringJobId, String queue, Expression`1 methodCall, String cronExpression, RecurringJobOptions options) in C:\projects\hangfire-525\src\Hangfire.Core\RecurringJobManagerExtensions.cs:line 313
at Hangfire.RecurringJobManagerExtensions.AddOrUpdate[T](IRecurringJobManager manager, String recurringJobId, String queue, Expression`1 methodCall, String cronExpression) in C:\projects\hangfire-525\src\Hangfire.Core\RecurringJobManagerExtensions.cs:line 298
at PowerShellUniversal.ComputerService.ScheduleMethod[T](String id, String cron, Expression`1 method) in D:\a\powershell-universal\powershell-universal\src\Universal.Server\Services\ComputerService.cs:line 412
at Universal.Server.Services.DashboardProxy.Start(Dashboard dashboard) in D:\a\powershell-universal\powershell-universal\src\Universal.Server\Services\Dashboard\DashboardProxy.cs:line 134
at Universal.Server.Services.DashboardManager.StartOnNode(Dashboard dashboard) in D:\a\powershell-universal\powershell-universal\src\Universal.Server\Services\Dashboard\DashboardManager.cs:line 95
at Universal.Server.Services.DashboardManager.Start(Dashboard dashboard) in D:\a\powershell-universal\powershell-universal\src\Universal.Server\Services\Dashboard\DashboardManager.cs:line 46
at Universal.Server.Services.DashboardManager.Restart(Dashboard dashboard) in D:\a\powershell-universal\powershell-universal\src\Universal.Server\Services\Dashboard\DashboardManager.cs:line 138
at PowerShellUniversal.AppPowerMenu.Restart() in D:\a\powershell-universal\powershell-universal\src\Universal.Server\Shared\Apps\AppPowerMenu.razor:line 125
at Universal.Server.Pages.Apps.Apps.RestartApp(Dashboard app) in D:\a\powershell-universal\powershell-universal\src\Universal.Server\Pages\Apps\Apps.razor:line 106
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Universal.Server.Pages.Apps.AppRowMenu.Invoke(EventCallback`1 callback) in D:\a\powershell-universal\powershell-universal\src\Universal.Server\Pages\Apps\AppRowMenu.razor:line 71
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
But—and this is what I find most baffling—it doesn't happen with all of them. A few work, but many don't—not even when only `New-UDApp -Content { 'Hello, World!' }` is defined.
What am I overlooking, or what can I do to get the apps working?
I would be grateful for any tips.
kind regards
Recommended Answer
Thank you for all the information! The problem is that PowerShell 7's RecycleSchedule is set to "5". That setting is a Cron expression, and a single number isn't valid, so that's why the apps are failing.
While looking at this, I realize it isn't very clear in the UI; we'll change this soon to be more clear like it is with Cron Schedules.
For example, if you're trying to recycle every 5 minutes, you'd want to use "*/5 * * * *". Please try updating to a valid Cron expression and this should resolve the issue for you.
Thank you!
Hi @andreasweber, thanks for bringing this to our attention.
Could you send us (with any sensitive data redacted) the full log of one of the affected apps starting? Is there an inner exception in the log for the "CRON expression is invalid" error?
Are the failing apps on the same environment as the successful ones?
Could you please provide the Recycle Schedule from the relevant Environments' Advanced Properties? Do these settings differ between environments or between your prod and test setups?
You could use this script to retrieve all of the environments':
Get-PSUEnvironment |
Select-Object Name, RecycleSchedule |
ConvertTo-Json -Depth 2
I do notice a bug that if the RecycleSchedule is cleared out, it's not being interpreted as "off" and is instead submitting an invalid empty string. I've opened a ticket for this, but the above information should hopefully tell us if this the problem you're having or not. Thank you!
Hi,
Thanks for your reply; here is the output:
PS C:\> Get-PSUEnvironment -ComputerName server1 -UseDefaultCredentials | Select-Object Name, RecycleSchedule | ConvertTo-Json -Depth 2
[
{
"Name": "CreatADUser",
"RecycleSchedule": null
},
{
"Name": "DBATools",
"RecycleSchedule": null
},
{
"Name": "Integrated",
"RecycleSchedule": null
},
{
"Name": "MSOnly",
"RecycleSchedule": null
},
{
"Name": "PNPOnly",
"RecycleSchedule": null
},
{
"Name": "PostProcessADUser",
"RecycleSchedule": null
},
{
"Name": "PowerShell 7",
"RecycleSchedule": "5"
},
{
"Name": "Windows PowerShell 5.1",
"RecycleSchedule": null
}
]
and here the same script from oour testenvironment:
PS C:> Get-PSUEnvironment -ComputerName testserver1 -UseDefaultCredentials | Select-Object Name, RecycleSchedule | ConvertTo-Json -Depth 2
[
{
"Name": "Windows PowerShell 5.1",
"RecycleSchedule": null
},
{
"Name": "Integrated",
"RecycleSchedule": null
},
{
"Name": "PowerShell 7",
"RecycleSchedule": null
},
{
"Name": "Environment",
"RecycleSchedule": null
}
]
i haven't found any additional logging in system log. Only Userlogs shows :
USerlog:
[20:43:08 INF][App][TestMinimal] Waiting for dashboard information...
[20:43:09 INF][App][TestMinimal] Dashboard information received. Starting dashboard.
[20:43:09 INF][App][TestMinimal] Creating services.
[20:43:09 INF][App][TestMinimal] Generating initial session state.
[20:43:10 INF][App][TestMinimal] Adding built in variables.
[20:43:10 INF][App][TestMinimal] Creating runspace factory.
[20:43:18 INF][App][TestMinimal] Running app startup script.
[20:43:19 INF][App][TestMinimal] Generating new session state from startup script.
[20:43:19 INF][App][TestMinimal] Serializing base app.
[20:43:19 INF][App][TestMinimal] Starting scheduler.
[20:43:19 INF][App][TestMinimal] Dashboard configuration complete.
[21:23:31 INF][App][TestMinimal] Waiting for dashboard information...
[21:23:32 INF][App][TestMinimal] Dashboard information received. Starting dashboard.
[21:23:32 INF][App][TestMinimal] Creating services.
[21:23:32 INF][App][TestMinimal] Generating initial session state.
[21:23:33 INF][App][TestMinimal] Adding built in variables.
[21:23:33 INF][App][TestMinimal] Creating runspace factory.
[21:23:43 INF][App][TestMinimal] Running app startup script.
[21:23:44 INF][App][TestMinimal] Generating new session state from startup script.
[21:23:44 INF][App][TestMinimal] Serializing base app.
[21:23:44 INF][App][TestMinimal] Starting scheduler.
[21:23:44 INF][App][TestMinimal] Dashboard configuration complete.
Thank you for all the information! The problem is that PowerShell 7's RecycleSchedule is set to "5". That setting is a Cron expression, and a single number isn't valid, so that's why the apps are failing.
While looking at this, I realize it isn't very clear in the UI; we'll change this soon to be more clear like it is with Cron Schedules.
For example, if you're trying to recycle every 5 minutes, you'd want to use "*/5 * * * *". Please try updating to a valid Cron expression and this should resolve the issue for you.
Thank you!
Thanks, that was the solution.
I deleted the value first (with GUI) and then ended up with the following entry:
"Name": "PowerShell 7",
"RecycleSchedule": ""
However, I think it should be set to null, because it only started working after I entered a valid cron expression !
Thank you very much for the quick support.