Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

REST API curl script not working

Pilar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2015

Hi All

I am trying to get the JQL result through a standard REST API curl script.

The curl script works fine on its own when invoked manually, but the moment i set it up as a cron it falls apart. It doesnot generate any JQL output.

Anyone with some expertise on Linux/Cron jobs can suggest what maybe going wrong here?

 

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Pilar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 24, 2015

I got it to work, there was a relative path in my script and crontab was not able to resolve it,

 

0 votes
Rich Scire September 22, 2015

Within a cron job, there are no environment variables set and the job runs as a generic user. If you are depending on system/user settings, this could cause a failure. As @Gabrielle Bautista above discusses, make sure (at least during debugging) that you save STDOUT and STDIN to a file. Make sure you print the command before executing top verify that the command line is what you expect.

0 votes
GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 22, 2015

What do you mean by it falls apart? What does your cron entry look liked? Have you redirected the outputs to a particular location or to the void? (/dev/null)?

TAGS
AUG Leaders

Atlassian Community Events