created some scripts within the automation section of Universal, if i run the scripts manually they work as expected (first time as well, which is rare for me haha)
I tried to schedule them firstly through here…
but the schedule didn’t seem to fire
Upon checking in the Schedules tab, there weren’t any schedules in there so i created a new one which told me that it had been created successfully but theres still no schedules
Can you tell me what settings you set for the schedule? I’d also suggest looking at the login %ProgramData%\PowerShellUniversal to see if there are any errors.
I just tried to create a basic, every 15 minute schedule on the latest 1.2 and it works for me so I might need a little more info.
Hey @adam sure thing
only error I can see round about the time I created a schedule was this
2020-07-02T14:18:04.9874836+01:00 [ERR] Failed to read configuration file. schedules.ps1 (0045c5f0)
System.Exception: Error while deserializing. A parameter cannot be found that matches parameter name 'PowerShellVersion'.
at UniversalAutomation.PowerShellSerializer`1.Deserialize(String script, IDatabase database, IConfigurationService configService) in E:\src\universal\src\UniversalAutomation\Services\PowerShellSerializer.cs:line 39
at UniversalAutomation.Services.UniversalConfigurationService.Read[T](Func`2 includes) in E:\src\universal\src\UniversalAutomation\Services\UniversalConfigurationService.cs:line 263
Schedule within the script task
schedule within schedules
Whoa. That’s cuz we are actually missing the PowerShellVersion on the New-PSUSchedule cmdlet!
Dang. Fixing now…will be in version 1.2.7.
Any suggestions on a workaround for now or do you think 1.2.7 will be out this week?
Just noticed that my schedules.ps1 actually has schedules in it
upgraded to 1.2.8 and now we have schedules! thanks @adam
Hi, I have 1.2.8 (had same issue in 1.2.7) and there is an issue with the scheduling when you specify a time period.
Cron job works fine, but when you enter a time manually, it does not get listed as a scheduled task.
Looks like it is registered in the schedules.ps1 file here as well for this scenario.
Looks like a bug. I’ve added it to the backlog for our next release.
We are getting this same error. Version 1.3.2, running the dashboard via install and not IIS. The scripts and times get inserted into the schedules.ps1 file but it doesn’t appear in the web page. Any suggestions on what to try?
even log shows this
Failed to read configuration file. schedules.ps1
System.Exception: Error while deserializing. Cannot retrieve the dynamic parameters for the cmdlet. Object reference not set to an instance of an object.
No idea what the problem was but I uninstalled universal, deleted the DB and files and started from scratch and it’s ok now. I had backups of all the required files I need to restore.
Weird. Ok. If you run into it again, ping me and I can help debug it.
I’m having this issue (v1.5.9), clearing the DB did not fix. I needed to completely remove the
-Computername param from my scheduled script to get it to schedule and show up. Here is the error:
2021-01-27T21:51:44.0725256-05:00 [ERR] Failed to read configuration file. schedules.ps1 (0045c5f0)
System.Exception: Error while deserializing. A parameter with the name 'Computername' was defined multiple times for the command.
at UniversalAutomation.PowerShellSerializer`1.Deserialize(String script, IDatabase database, IConfigurationService configService) in D:\a\universal\universal\src\UniversalAutomation\Services\PowerShellSerializer.cs:line 37
at UniversalAutomation.Services.ConfigurationScript`1.ReadAsync(Boolean initialSync) in D:\a\universal\universal\src\UniversalAutomation\Services\Configuration\ConfigurationScript.cs:line 148