Handling Long-Running PowerShell Universal Jobs Without Timeouts

Hello

A common challenge when working with PowerShell Universal is managing long-running jobs that exceed default execution time limits / trigger timeouts. This can be especially problematic for complex automation workflows, such as large-scale data processing, API integrations / system maintenance scripts that require extended execution time. :innocent:

Users often experience jobs being forcibly terminated; leading to incomplete processes or unexpected failures. :upside_down_face:

One potential solution is adjusting timeout settings in Universal Automation, ensuring that long-running scripts have enough time to complete. Another approach is implementing asynchronous execution using background jobs, ensuring that PowerShell Universal doesnโ€™t block the UI / kill the process prematurely. :thinking: I checked Jobs failing most of the timesAzure training related to this and found it quite informative.

Additionally, logging intermediate progress & using checkpoints can help track execution without losing critical data if a timeout does occur. :upside_down_face:

Has anyone successfully handled long-running jobs in PowerShell Universal? Are there best practices for preventing unexpected terminations while keeping resource usage optimized? :thinking: Letโ€™s discuss strategies to improve reliability for extended automation tasks.

Thank you ! :slightly_smiling_face: