I have a PS script that runs fine when run directly (r-click and choose 'run in powershell') but when I set up a job in vcron the script does not run and I get errors like the below messages. I have tried various methods of wait times and pauses withink the scripot and they dont work. There is something in the say vcron is handling the script that is causing it to run differently than when run directly.
Am I missing something? A checkbox that will fix this issue?
Script started at: 11/06/2024 08:42:48
Found 3 PDF files to process at: 11/06/2024 08:42:48
Attempting to print: \\UNCPath\TEST FOLDER\file1.pdf at 11/06/2024 08:42:48
Process for \\UNCPath\TEST FOLDER\file1.pdf did not exit within timeout at 11/06/2024 08:43:48
Attempting to print: \\UNCPath\TEST FOLDER\file1.pdf at 11/06/2024 08:43:58
Process for \\UNCPath\TEST FOLDER\file1.pdf did not exit within timeout at 11/06/2024 08:44:58
Attempting to print: \\UNCPath\TEST FOLDER\file1.pdf at 11/06/2024 08:45:08
Script started at: 11/06/2024 08:52:54
Attempting to print: \\UNCPath\TEST FOLDER\file1.pdf at 11/06/2024 08:52:54
Process for \\UNCPath\TEST FOLDER\file1.pdf already exited at 11/06/2024 08:52:59
Attempting to print: \\UNCPath\TEST FOLDER\file1.pdf at 11/06/2024 08:52:59
Process for \\UNCPath\TEST FOLDER\file1.pdf already exited at 11/06/2024 08:53:05
Attempting to print: \\UNCPath\TEST FOLDER\file1.pdf at 11/06/2024 08:53:05
Process for \\UNCPath\TEST FOLDER\file1.pdf already exited at 11/06/2024 08:53:10
Script finished at: 11/06/2024 08:53:10