Unix Technical Forum

crontab not working

This is a discussion on crontab not working within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi I used crontab -e to set up a backup job for every Friday at 2155 hrs : # ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 03:51 PM
Madhusudan Singh
 
Posts: n/a
Default crontab not working

Hi

I used crontab -e to set up a backup job for every Friday at 2155
hrs :

# Backup
55 21 * * fri /usr/local/storeBackup/bin/backup.sh

However, the time at which the job was supposed to start has come
and (long) gone, and I still do not see this script being executed. What
could I be missing ?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 03:51 PM
Alan Connor
 
Posts: n/a
Default Re: crontab not working

On Fri, 24 Sep 2004 23:17:06 -0400, Madhusudan Singh
<spammers-go-here@spam.invalid> wrote:

> Hi
>
> I used crontab -e to set up a backup job for every
> Friday at 2155 hrs :
>
> # Backup 55 21 * * fri /usr/local/storeBackup/bin/backup.sh
>


Does that line end in a newline? It needs to, unless you
terminate it with a %.

What do your system logs say? /var/log/syslog, etc.

> However, the time at which the job was supposed to
> start has come and (long) gone, and I still do not see this
> script being executed. What could I be missing ?
>
> Thanks.


Does the script run standalone?
Put set -x at the top to see debugging output.

Often, you need to set key environment variables in scripts
run by cron, and the full paths to all files, executable
and otherwise.


HTH

AC

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 03:51 PM
Brendon Caligari
 
Posts: n/a
Default Re: crontab not working

Madhusudan Singh wrote:
> Hi
>
> I used crontab -e to set up a backup job for every Friday at 2155
> hrs :
>
> # Backup
> 55 21 * * fri /usr/local/storeBackup/bin/backup.sh
>
> However, the time at which the job was supposed to start has come
> and (long) gone, and I still do not see this script being executed. What
> could I be missing ?
>
> Thanks.


Does the script exist?

Does it have execute permissions set?

Does the user for which the crontab has been set have the right to
execute that script and whatever it does?

Can you execute that script manually as designated user?

Have you received some email saying what happened with the cron job?
(If you are running crontab as root, is root aliased in /etc/aliases
....and maybe you would be better off, say dropping a crontab in /etc/cron.d.

Is cron working properly? You can cron a test entry such as:
20 15 * * * date > /tmp/cron.test
(time say....two minutes in the future) to check if cron is working.

Have you checked the system log files?

[[ sidenote: is once a week sufficient backup? ]]

B.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com