Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm examining a particular setup, and they have their crontab as follows:

 0 * * * * lynx

Of course, this relies on the 'security-by-obscurity' precept, because any person on the internet, knowing where those files are located, can call them and potentially overload the server.

Besides that, is there anything inherently wrong with the above 'model' of running that script.

When I tested lynx from the command prompt as root, it prompted me to download a session cookie, so I'm thinking I should atleast be modifying the above to:

lynx -accept_all_cookies

Or should I be using:

wget -q -O /dev/nul
share|improve this question
You are missing an "l" in "null". Don't want to miss that. – Lothar_Grimpsenbacher Nov 5 '10 at 3:02
up vote 2 down vote accepted

If you want to secure those files, you can configure your web server to allow connections to those particular scripts only from localhost. You didn't mention what webserver you use, but for example in Apache this could be done with the combination of Directory and Allow/Deny parameters, something like

<Directory /cron>
    Order deny,allow
    Deny from all
    Allow from localhost

For additional security you may modify your cron scripts to check the client address. If it's other than localhost, refuse to do the cron magic and return something else.

When it comes to tools, lynx and wget are both fine. When I use lynx in cron, I tend to use it with -dump flag, though.

share|improve this answer
thanks for the Apache input! That is very insightful! About the -dump option - why are you using that? how would you be notified if something went wrong? – siliconpi Oct 29 '10 at 8:19
I don't know why I'm using -dump (or -source) options, must be some old habit. Gotta try what happens without them ... one way to get notified if something went wrong would be to configure your cron script to return some string like "SUCCESS", and then grep for it. If that string is missing, then send out an e-mail. For example, 'lynx -dump | grep "SUCCESS" && echo "OK" || ( echo "Not OK" | mail -s 'Something went wrong'' ) – Janne Pikkarainen Oct 29 '10 at 8:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.