Re: [Hampshire] Cron script problem

Top Page

Reply to this message
Author: Tim
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Cron script problem
On Tuesday 05 October 2010 19:15:06 Stuart Sears wrote:
> On 05/10/10 18:49, John Cooper wrote:
> > On 05/10/10 18:25, Vic wrote:
>
> [snip excellent advice]
>
> >>> How do I get cron to run them and where do I find any logs files that
> >>> may
> >>> point to what is going wrong?
>
> show us the output of
> crontab -l
>
> as the user who owns these scripts?
> plus
>
> ls -l /path/to/scripts
>
> >> Check root's email. cron can mail anyone you tell it to, but if you
> >> haven't specified someone (and I doubt that you have), root tends to get
> >> the reports.
>
> well, only if the jobs are in root's crontab.
> ...which is just plain wrong - that's what /etc/cron.d is for (okay,
> that's a matter of opinion and a little off-track for this)
>
> [...snip other excellent advice...]
>
> I'm not sure exactly what webmin does with cron.
>
> But setting it up manually could be achieved with a bit of advice (and
> it's a good learning experience too)
>
> https://help.ubuntu.com/community/CronHowto
>
> (while I don't agree with all of it, it's mostly pretty good)
>
> Regards,
>
> Stuart


OK in no particular order I tried the commands suggested with the following
results

ps ax | grep crond
4010 pts/0    S+    0:00 grep --color=auto crond (crond was written in red typeface)


So that tell me crond is running

crontab -l

0 0 * * 1 /backup.day1.sh # Day 1 backup
(the same was repeated for each of the other 4 scripts)

This tell me that at midnight on days 1 to 5 the script will run, yes?

ls -l /backup
-rwxrwxr-x 1 root root 357 2010-10-05 20:43 day1
(the same was repeated for each of the other 4 scripts)

This tell that root owns the folder and each of the 5 scripts there in, I think
I may need to change some of the permission so only root can run and write?

In regards to webmin, it just make it easy for me to administrate the control of
the server as opposed to cli

I looked in mail and yes there were mails regarding cron there. Basicly it is
saying /backups/day1 file not found So the problem is how do I tell it to
chnage to the backup folder and then run the script?

I should point out (if it makes any difference) that I am access the server via
vnc

Tim