|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Cron Job with Lynx
If my Lynx directory is /usr/local/bin/lynx and my pwd directory is /usr/local/www/virtual1/12/345/67/89 and I want to set up a cron job for http://mysite.com/script.php every day at 3:30 AM, would it go like this?:
30 3 * * * root /usr/local/bin/lynx /usr/local/www/virtual1/12/345/67/89 http://mysite.com/script.php I just want to be able to do a cron job for an http address and I've been told I can do that with Lynx, which is installed on the server I'm using. |
|
#2
|
||||
|
||||
|
Maybe I'm missing something, but what does the pwd directory have to do with getting lynx to hit a web page?
Why not just do this: 30 3 * * * root /usr/local/bin/lynx http://mysite.com/script.php
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#3
|
|||
|
|||
|
I've tried doing a cron job with the pwd directory before because I was told that I needed it when not using Lynx.
I just don't usually work with cron jobs. Thanks. Hope this works. |
|
#4
|
||||
|
||||
|
On second thought, you might want to add the --dump option to the command line:
(i.e.) 30 3 * * * root /usr/local/bin/lynx --dump http://mysite.com/script.php Why do you need --dump? If you don't specify it, lynx may get the page and then wait for input (i.e.) a keypress from you. Since this job is started by a cron daemon, there will never be any keypresses and thus lynx won't terminate. If you specify the --dump option, lynx fetches the page, prints it out and then terminates. In addition, the cron job will take the lynx output and email the owner of the crontab. Thus, you can view the output of the webpage later in the day. If you don't care much about the webpage output, you can do this instead: 30 3 * * * root /usr/local/bin/lynx --dump http://mysite.com/script.php > /dev/null |
|
#5
|
|||
|
|||
|
Hi guys, I am trying to get the same thing to work for me, when I mail out a webpage, on a nightly basis.
I have created a file called website_reports and placed it in cron.daily's directory. From a commandline if I type: lynx --dump http://195.66.240.211/cgi-bin/whois...omainname.co.uk | mail user@domain.com -s "WhoIs DomainName.co.uk" it works and I get an email sent to me from my cronjob I just get a blank email. My batch file looks like this: #!/bin/sh lynx --dump http://195.66.240.211/cgi-bin/whois...omainname.co.uk | mail user@domain.com -s "WhoIs DomainName.co.uk" How do I do this on my Raq4? Cheers Chewiee |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Cron Job with Lynx |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|