Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


MaxorNPS
2014-12-11T16:52:57Z
We are have numerous powershell scripts running and have had issues with them running correctly in the background. SOmthing such as populating database tables or writting to log files which is most recently. We used the below script to write to a relitive path to a log file and it never populates with new data. But it still does write the log file, just writes incorrectly. If we use a .bat file to run the powershell in visual cron then it runs fine or it runs fine in powershell outside of visual cron. Just seems like Visual Cron need to do some work on powerhsell scripts. The PSScriptRoot is the command in question


$PSScriptRoot + "test" | Tee-Object -Append -FilePath c:\ScheduledApps\jps\Notify\log.txt
$Host | Tee-Object -Append -FilePath c:\ScheduledApps\jps\Notify\log.txt
"after log write" | Tee-Object -Append -FilePath c:\ScheduledApps\jps\Notify\log.txt
Sponsor
Forum information
Scroll to Top