Author Topic: Quote/quotes in cronjob  (Read 767 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Quote/quotes in cronjob
« on: March 06, 2020, 04:59:41 PM »
Can anyone tell me, how to add cron job with quote/quotes within command ?
Right now, when I put new cron job from user, quote/quotes will get escaped.
Example:
Code: [Select]
wget -q -O - "https://example.com/system/jobs/run_single?auth=f27e083fdc05a20474eafa808d430a1c&jID=11" >/dev/null 2>&1
will saved like this:
Code: [Select]
wget -q -O - \"https://example.com/system/jobs/run_single?auth=f27e083fdc05a20474eafa808d430a1c&jID=11\" >/dev/null 2>&1
Which was just can't read by the system.
Note: quotes is needed because there a '&' symbol in url.