Jobber Notify Program

ยอดดู 20 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Huang Weiqi

ยังไม่อ่าน,
12 เม.ย. 2562 05:05:3212/4/62
ถึง Jobber
Hi Dylan,

Thank you for writing Jobber. It has been a great help in my project, being a cleaner and better version of cron.

I have been using the notifyProgram function of Jobber, but I am having some difficulties reading the the JSON document from the stdin and I can't really figure out why. I searched around but still couldn't find any answers and hope you can help out.

I use notifyProgram to execute a simple bash script as follows:

#!/bin/bash

VALUE=$(cat)

cd <to directory>
python3 some_python_script.py "$VALUE"

where I attempt to read the file from stdin, and then pass it as a argv to my python_script.

May I know if I am handling the stdin wrongly? What does it mean when you say that you will "write to stdin a JSON document .. "? 

Thank you for your help in advance. :)

Huang Weiqi

C. Dylan Shearer

ยังไม่อ่าน,
4 พ.ค. 2562 14:20:584/5/62
ถึง Huang Weiqi, Jobber
Hi Weiqi,

Apologies for the delay.

I suspect that the quotes in the JSON are causing problems when you pass it to the Python script.  Maybe you should try using the Python script itself as the notify script, after modifying it to read from stdin rather than from argv.

Best,
Dylan

--
You received this message because you are subscribed to the Google Groups "Jobber" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jobber-proj...@googlegroups.com.
To post to this group, send email to jobbe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jobber-proj/92bc30e6-72e0-4639-9cc8-92311d7c4985%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ