Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-25-2009, 08:00 AM   #1
LQ Newbie
Registered: Jan 2009
Posts: 8

Rep: Reputation: 0
Script won't run in crontab

Hi all,
I say you in advance that I'm linux newbie

I've to run a simple script in a crontab job : this work via shell but won't start via crontab job (it seems that doesn't start). I've tried to make a log (adding a > /home/errlog.log) but this is empty.

OS = ubuntu server 8.10

Here's my script
cd /usr/bin/
./vmware-mount /var/lib/vmware/Virtual\ Machines/server/server.vmdk /mnt/server/
mount.cifs //server/c$ /mnt/sv_c ro -o username=user%pwd
rsync -a -v --delete /mnt/sv_c/Inetpub/wwwroot/folder /mnt/server/Inetpub/wwwroot/
umount.cifs /mnt/sv_c
./vmware-mount -d /mnt/server/

My script is in /root/ folder
I've added a line in crontab -e
0 13 * * * /root/ > /dev/null

Anyone of you could you help me to find issue...?

In other forum someone says to use absolute path in crontab call
So I change it in
0 13 * * * /bin/sh /root/ > /dev/null
But nothing change

Someone say me that crontab environment run separately from user shell environment

I become crazy....

Is there others way to run this script ??????

Thanks to all
Old 03-25-2009, 08:27 AM   #2
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
you need to use absolute path in the script
rsync => /usr/bin/rsync
idem for other commands
also, you should recieve a email from cron with the error messages
Old 03-25-2009, 09:18 AM   #3
LQ Newbie
Registered: Jan 2009
Posts: 8

Original Poster
Rep: Reputation: 0

:-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-) :-)

Many many thanks


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run this script in Crontab baig Linux - Newbie 2 11-30-2008 02:34 PM
how to run crontab in shell script panselva Linux - General 3 05-08-2008 08:33 PM
script won't run in crontab(centos 5) ncsuapex Programming 2 03-09-2008 06:55 PM
Crontab -e doesnt run my script ! c0nsur Linux - General 4 08-03-2005 11:21 PM
Script doesn't run in crontab dani81 Linux - General 1 11-16-2004 03:42 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration