Solved

Plesk Cron Setup

Posted on 2011-02-17
9
966 Views
Last Modified: 2012-08-13
Hello,

I have a cron setup and it will work only if the action only takes a couple seconds but if it takes about 10 minutes to complete the action it does not complete it.

Here is what I am using:
/usr/bin/wget "http://www.dmain.com/insert.php"
0
Comment
Question by:movieprodw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 5

Expert Comment

by:jason987
ID: 34919596
Cron does not wait for applications to execute it just fires them off and moves on.

I think wget has a default timeout but I can't remember or find out what it is at the moment, you could set it in your command though:

--timeout=seconds
0
 
LVL 1

Author Comment

by:movieprodw
ID: 34920478
Is there something other than wget that I can use that will not timeout?
0
 
LVL 5

Expert Comment

by:jason987
ID: 34920575
Setting the timeout to 0 disables it.  

If you are just looking to try somethign else curl is pretty popular for silent http transfers.

http://en.wikipedia.org/wiki/CURL
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:movieprodw
ID: 34920851
so I would go like this?

/usr/bin/wget "http://www.dmain.com/insert.php" --timeout=0
0
 
LVL 5

Accepted Solution

by:
jason987 earned 500 total points
ID: 34920901
I don't know if it makes a difference in wget/version but the option switches come before the target:

/usr/bin/wget  --timeout=0 "http://www.dmain.com/insert.php"
0
 
LVL 5

Expert Comment

by:jason987
ID: 34920912
But yes, that sets it to wait forever.  Personally I don't like saying "forever" (in code) so I would just set something extremely high.
0
 
LVL 1

Author Comment

by:movieprodw
ID: 34920943
Okay, I am guessing it is in seconds so maybe I can set it to 2 hours or something, so I would go...


/usr/bin/wget  --timeout=7200 "http://www.dmain.com/insert.php"

... is that correct?
0
 
LVL 5

Expert Comment

by:jason987
ID: 34921015
Yes.  My rule is to always test a command as a last step before copying it into cron.  It's a pain to have something go crazy at 1am.
0
 
LVL 1

Author Closing Comment

by:movieprodw
ID: 34921070
Thank you
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question