Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 582

JQ works when I run PowerShell through terminal but not when I use cron jobs

$
0
0

I'm working on a PowerShell code using jq inside it.jq -c '.Documents[]' FULL_PATH/input.json > FULL_PATH/output.jsonWhen I directly execute it in terminal the entire program runs without any issues but not as a cronjob.

This is what is in "crontab -e" right now:18 9 12 4 * /opt/homebrew/Cellar/powershell/7.4.1/libexec/pwsh FULL_PATH/query.ps1 >/tmp/stdout.log 2>/tmp/stderr.log

It will stop executing at the jq line and error out. I'm not sure how to go about getting this to work. Thanks!


Viewing all articles
Browse latest Browse all 582

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>