Plesk Cron Setup

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"
LVL 1
movieprodwAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jason987Connect With a Mentor Commented:
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
 
jason987Commented:
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
 
movieprodwAuthor Commented:
Is there something other than wget that I can use that will not timeout?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
jason987Commented:
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
 
movieprodwAuthor Commented:
so I would go like this?

/usr/bin/wget "http://www.dmain.com/insert.php" --timeout=0
0
 
jason987Commented:
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
 
movieprodwAuthor Commented:
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
 
jason987Commented:
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
 
movieprodwAuthor Commented:
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.