The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 16, 2019, 01:16:05 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Problem with linux cron and curl  (Read 2163 times)
nattsurfaren
Journeyman
***
Offline Offline

Posts: 64


View Profile
« on: December 17, 2008, 02:07:13 AM »

My colleague is trying to make a script work on linux with cron.
What the scipt does is scrape 1 SERP and se what position a sertain website is on. Then is send report via mail.
First when running manually without cron the script work fine whithout problem.
The cron executes the script and php mail is sent. But serp scraping fails.
Only sometimes noted on monday and today (wednesday) the script scraped one time each day. It should scrape every hour.
Script is runned by root rights.
When running the same script on my reseller domain account in cpanel the script works fine without any problem.

What could be the problem. Appreciate your help on this.

Sincerely
Natt.
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: December 17, 2008, 09:08:58 AM »

Good lord Natt, you must think the folks here are magic.

You need to install a whole bunch of debug logging to see what happens. What you need is symptoms aplenty to triage the problem.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nattsurfaren
Journeyman
***
Offline Offline

Posts: 64


View Profile
« Reply #2 on: December 18, 2008, 05:51:39 AM »

The linux is on a virtual machine.
After some tests we concluded that the machine goes into sleep mode and with a empty run on the cron we make the virtual machine wake up and second call succeeds with the scraping.
We could try to make a sleep of a couple of seconds before calling curl but I don't know if this will help.
I'm not familiar with this sleep procedure how this is working or how to turn it of.

/Natt
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: December 18, 2008, 06:55:04 AM »

Well done.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!