Cron problems - hair pulling time!

justahost

Verified User
Joined
Mar 19, 2006
Messages
122
Evening all!

Before I start, yes I have had a search and read through all the old post reference cron problems.

Nothing works :(

If I have DA via the people I get a dedi server fro, am I still able to approach DA support here to see if they can sor the cron probs out that I have?

Its just that I have added a few lines to a cron and they dont seem to work, they include:

1. AWStats updater (run stats each night)
2. A perl script that runs as root to dump all databases
3. Auto update of Installatron overnight

None of them appear to work!

Cheers
Ry
 
1. Where exactly did you add them?

2. Are the files executable?

3. What is the output of:

Code:
crontab -u username -l

Replace username with the user that the crons were setup under.

--

4. Run the command:

Code:
ps xua | grep cron

What is the output of this command.

5. Also look for any errors in /var/log/cron or /var/log/directadmin/error.log (if using directadmin for crons)
 
Cheers for the advice - it appears that I was doing it the wrong way!!

Slapped the lines into the root user cron and it worked!

I had tried it in every other location apart from the right one by the look of it.

Ah well, whats a week banging me head against a wall, what a numpty I feel ;) ;)

Cheers again for the help!

Ry
 
OK - I was wrong again!!

Here are the bits that were asked for:

1. /var/spool/cron is the directory

2. All of the crons in there have the permissions set to: rw-------

3. crontab -u root -l lists all the cron jobs in there

4. cron is running :)

5. /var/log/cron is empty
/var/log/directadmin/error.log has a few line sin it, but nothing for the last couple of days (when I have tried to sort the cron out)

Anything appreciated :)

Ry
 
Are you giving the complete path to the command? When making a cron job you need to give the complete path because while the job is run as the user that made it cron does not actually log in so no path is set.
 
I give up ;)

Checked it all last night and went t obed - wake up to find all crons ran fine :s

Will leave it as it is now :)

Cheers and fingers crossed!
 
Back
Top