Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
275 views

Example of Using Flock in CURL to Avoid Multiple Parallel Instances

my bash script runs using incron whenever there is change in directory. However, since multiple images are uploaded, so I don't want to run multiple instances of CURL (that is used to build thumbnail ...
Bilal Bhatti's user avatar
0 votes
2 answers
681 views

Passing a String variable or String array into a curl script from python

I have a curl script taken from Vonage's website that send a message to my personal WhatsApp containing whatever is inside the " " after "text": curl -X POST https://messages-...
bglavurti's user avatar
0 votes
1 answer
184 views

Format URL with the system date in bash

I would run a .sh script to execute an operation from a server only if the given URL is up. The URL where I get data updates everyday (but I dont know exactly what time it updates). A cron job would ...
hug's user avatar
  • 277
0 votes
1 answer
3k views

Troubleshooting Cron with Curl on Pushgateway (Prometheus)

I'm testing Pushgateway along Prometheus, pushing simple data about my VMs' services every minute with a bash script and curl, triggered by crontab. I have two bash scripts. The first one, cpu_usage....
Aerkaos's user avatar
  • 35
1 vote
1 answer
3k views

Crontab not executing CURL command in linux

I created bash script and tried to execute it manually.then it's working properly. After that I created crontab and set it to execute after every 5 minutes.but it's not working. here is my script #!/...
DevAra's user avatar
  • 530
-1 votes
2 answers
2k views

Cron job sometimes fails with error by curl

I made a cron job in (Ubuntu 14 Trusty), like this way: sudo crontab-e then PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin * * * * * curl --silent http://www....cron_script....
user avatar
0 votes
1 answer
2k views

Nested cURL call

I've one cron task to update my DDNS with my current ip address and do it through a cURL call. The problem is one of the parameters to pass in the call is the CURRENT IP and in order to discover ir i ...
Rafael Lima's user avatar
  • 3,374
0 votes
2 answers
6k views

curl error 56 (failure receiving network data) when run from cron

I have a bash script that uses curl to retrieve a file. It runs fine when I run it from interactive bash shell but curl fails with exit code 56 (failure in receiving network data) when I run the ...
Michael Brown's user avatar
0 votes
2 answers
135 views

Execute a curl command if cronjob backup fails

I have a cronjob that takes backup of my DB every 10 min. I want to receive an SMS whenever the backup fails. Example: */1 * * * * sudo /usr/local/sbin/mysql.sh 2>&1 | curl 'http:www.smsapi....
Ash's user avatar
  • 15
0 votes
1 answer
2k views

cURL doesn't work in CRON

My shell script works fine when running it from terminal (e.g., ./postdata.sh), but when run from CRON it doesn't work. I've confirmed the PATH and am using full paths to call the shell scripts. I'...
UFANS's user avatar
  • 11
1 vote
1 answer
509 views

S3 Upload via CURL fails when triggered via cronjob

I'm using a script dump-to-s3.sh to put database dumps in a S3 bucket. When triggered manually it works perfectly but when I trigger it via this cron (as root crontab) it fails with the following ...
Hedge's user avatar
  • 16.6k
34 votes
1 answer
10k views

Percent sign % not working in crontab

I have a cron issue with curl: curl -w "%{time_total}\n" -o /dev/null -s http://myurl.com >> ~/log works great and add a line in log file with total_time. But the same line with cron doesn't ...
user3647822's user avatar
0 votes
0 answers
142 views

curl wierd behaviour when script runs as a cron job

I have a shell script file which contains a curl command running in a loop. The problem is that when I set the script to run as a cron job, curl doesn't work fine anymore. Most of the times it runs ...
gnome's user avatar
  • 593
0 votes
2 answers
2k views

Execute bash script from url via cron

I am trying to get a cloud server (built from an image I have saved) to execute a script from a URL upon startup, but the script is not executing properly. I used one of the answers from Execute bash ...
Daniel Widdis's user avatar
2 votes
2 answers
420 views

Cron job works differently than as stand alone

I have a shell script that periodically checks the ADSL external IP address and send it to my email if it has changed. #! /bin/sh NEWIP=`/usr/bin/curl ifconfig.me` OLDIP=`cat ./current` logger "$...
eric's user avatar
  • 73

15 30 50 per page