I have a wolfram script file (.wl) that processes a csv file and generates a PDF output. I have written a PowerShell Script which checks for new input data files and runs the wolfram script file over them using the following command line:
wolfram -script my_script_file.wl
This works fine when the process is run by a logged in user. When it is run on a server executed by a Windows Scheduled Task, I encounter problems exporting the pdf. The following error appears:
Export::fmterr: Invalid PDF format.
I've tried to research this issue. It seems that the part of Mathematica that generates the PDF export isn't available when run using a service account in a Windows Scheduled task.
Is there any way to get around this? Has anyone encountered a similar issue? Would using one of the other exe's to launch the script help? wolframscript.exe, MathKernel.exe, etc?
Thanks for your time and assistance!