Sponsored Content
Top Forums UNIX for Dummies Questions & Answers curl from crontab not working Post 302209710 by eBay on Friday 27th of June 2008 11:55:56 PM
Old 06-28-2008
curl from crontab not working

I've got a little php app that I'm trying to call from a crontab entry that's not working. The entry looks like this:

55 * * * * curl -m 600 --connect-timeout 120 http://www.mysite.com/ad_renewal.php

When I run curl from the command line, it works fine and I get an email saying so. However, from within cron, it doesn't go. I tried a little echo line that wrote hello to a file and that worked fine so I think I'm doing OK with my cron properties.

Strange. Maybe there's some security restriction on curl? Not sure what it could be.

Oh, yeah, originally, only had curl url and I added the other options thinking that it might be timing out or something. The process does take about 45 seconds to run.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

crontab NOT working

Hi, I have put the following entry in crontab and it is NOT working 1 * * * * && /mybin/myjob.sh As today is Sep 26th, Iam using NF-4 to test. Thanks (2 Replies)
Discussion started by: baanprog
2 Replies

2. UNIX for Dummies Questions & Answers

crontab not working

In /oracle folder, I created a file called "script.ksh" using vi command. The content of script.ksh is * * * * * echo "welcome">/tmp/capture.log I want the word "welcome" to be displayed in /tmp/capture.log file every minute. I have created capture.log under /tmp folder. Then in... (2 Replies)
Discussion started by: lg123
2 Replies

3. Solaris

crontab is not working.

I have a script which name is sicaklik.sh It is in the root directory. I can run manually but I want to run automatically every 3 minutes but it is not working. WHY? #whoami root #crontab -l #ident "@(#)root 1.21 04/03/23 SMI" 3 * * * * sh ./sicaklik.sh #ls -l sicaklik*... (6 Replies)
Discussion started by: getrue
6 Replies

4. UNIX for Dummies Questions & Answers

crontab not working

Hi, I had setup crontab to execute my script every day midnight 00:00 Below are the current settings. crontab -l 0 0 * * * /apps/bin/compress.ksh_moht > /dev/null 2>&1 Should it not work? I need help fix this? (8 Replies)
Discussion started by: shifahim
8 Replies

5. Red Hat

crontab is not working!!

I can run manually script of ntopdump.sh but crontab can't run this script very five minutes. # crontab -l */3 * * * * root sh /root/ping.sh */5 * * * * root sh /root/ntopdump.sh # # pwd /root # ls -l total 88 -rwxrwxr-x 1 root root 1645 Jun 14 19:01 anaconda-ks.cfg drwxrwxr-x 2 root... (14 Replies)
Discussion started by: getrue
14 Replies

6. Shell Programming and Scripting

Crontab not working

Hi All, I have a script with deatils as : $ ls -ld catch_logs.sh -rwx--x--x 1 muser muser 752 Jun 5 22:36 catch_logs.sh User crontab looks likes: $ crontab -l SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin * * * * * /opt/scripts/catch_logs.sh Now if I run this script... (7 Replies)
Discussion started by: Junaid Subhani
7 Replies

7. Red Hat

Crontab is not working

Dear Friends, I have Red Hat Linux Enterprise version 6.3. running SAP and oracle. I have created one crontab for user orasid to execute one job periodically. But it is not executing. I have checked crontab service is running. Please help in the matter. Regards, Bhagawati Pandey (5 Replies)
Discussion started by: BPANDEY
5 Replies

8. UNIX for Beginners Questions & Answers

Curl to download using Linux not working

Good Morning. I'm trying to download a file from a server. I was able to upload to the server successfully but when i download, i see the file name in my server but with some unknow data. The file name i'm trying to download is abcd.zip in binary mode. curl -1 -v --ftp-pasv -o abcd.zip -u... (4 Replies)
Discussion started by: Pavan Kumar19
4 Replies

9. Shell Programming and Scripting

Working web service call not working with curl

Hello, Newbie here, I have a perfectly well working web service call I can issue from chrome (PC Windows 10) and get the results I want (a dimmer being turned on in Fibaro Home Center 2 at level 40) I am not allowed to post urls but the below works with http and :// and... (3 Replies)
Discussion started by: abigbear
3 Replies

10. Shell Programming and Scripting

Script containing Curl doesn't run with crontab

Hello I have a problem with the crontab command when I run a code containing Curl on the command line it runs without fail but as soon as I program it with crontab it executes everything except the curl returns fail thank you for helping me to resolve this problem because since Monday I look... (14 Replies)
Discussion started by: beautymind
14 Replies
CURLOPT_FILETIME(3)					     curl_easy_setopt options					       CURLOPT_FILETIME(3)

NAME
CURLOPT_FILETIME - get the modification time of the remote resource SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FILETIME, long gettime); DESCRIPTION
Pass a long. If it is 1, libcurl will attempt to get the modification time of the remote document in this operation. This requires that the remote server sends the time or replies to a time querying command. The curl_easy_getinfo(3) function with the CURLINFO_FILETIME(3) argu- ment can be used after a transfer to extract the received time (if any). DEFAULT
0 PROTOCOLS
HTTP, FTP, SFTP, FILE EXAMPLE
curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, url); /* Ask for filetime */ curl_easy_setopt(curl, CURLOPT_FILETIME, 1L); res = curl_easy_perform(curl); if(CURLE_OK == res) { res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime); if((CURLE_OK == res) && (filetime >= 0)) { time_t file_time = (time_t)filetime; printf("filetime %s: %s", filename, ctime(&file_time)); } } /* always cleanup */ curl_easy_cleanup(curl); } AVAILABILITY
Always, for SFTP since 7.49.0 RETURN VALUE
Returns CURLE_OK SEE ALSO
curl_easy_getinfo(3), libcurl 7.54.0 April 03, 2017 CURLOPT_FILETIME(3)
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy