Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Simple Cron Just Does Not Want To Run, Cron with CURL on webserver
post Feb 6 2004, 12:59 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 6-February 04
Member No.: 2,316

Hiya everyone,

I am trying to solve this problem for about a week now.
I need to install a cron for running an automatic maintenance script every hour.

We have SUSE 8.1 Linux installed on our webserver.

We could use curl or wget to run the script.
This is what we have to install into the cron.

# if your server supports curl:
0 * * * * curl -s -o /dev/null

# if your server supports wget:
0 * * * * wget -q -O /dev/null

We tried both, wget and curl but the script does not run.
How could I write an error message into a file. Right now /dev/null eliminates the option to have error messages recorded. I do not know the correct syntax on how to change that into a /dev/filename.txt or something like that?

When I copy the URL and enter the exact same URL in my webbrowser the scrip runs and does its job.
The problem is definately that the cron does not run.

This is the result when I call up cron by -----> cron -l

$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (cron.txt installed on Fri Feb 6 13:20:22 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0 * * * * /usr/bin/curl -s -o /dev/null

Soemeone told us that we have to use the full path for the curl application that is why we did not copy the suggested line 1:1 but added /usr/bin/curl instead of just using curl -s -o We tried both ways but none worked.

Hope you have an idea what might be the problem.

Go to the top of the page
+Quote Post
post Feb 6 2004, 03:06 PM
Post #2

Its GNU/

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151

instead of writting the output to /dev/null .... write the output to a file ... like this:

0 * * * * /usr/bin/curl -s -o /var/log/maintenance.log

Then you can look at the file /var/log/maintenance.log and see when the cron ran and what the page looked like.

Johnny Hughes
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
+Quote Post
post Feb 6 2004, 07:06 PM
Post #3

Whats this Lie-nix Thing?

Group: Members
Posts: 2
Joined: 6-February 04
Member No.: 2,316

Thanx for your help.

I am a bit smarter now. I found out that our server has a totally messed up configuration.

I edited the cron so that a log file is written. Nothing happened.

Then I checked the server for cron jobs and found out that the normal directory where cron jobs are stored is not even present. Instead I found different directories like:


In the cron.daily I found a lot of jobs which seem to run. In the cron.d was only one job which definatly also runs. I edited the file and added my job to that file. NOW it works!

The problem is that this file was generated by the sever software confixx and it will probably be overwritten whenever I edit anything about the configuration. I tried to add my cron into that directory but that did not work either.
For now I have at least the cron running but I am pretty mad at the server guys who setup the system in this way. The normal way how a cron should be added does not work at all. It is just not started.

Maybe someone knows a bit more about this kind of server setup for cron jobs. It could help a lot of others as well whose cron is not working as it should.

Best greets

Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 18th October 2017 - 12:35 AM