View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-02-2007, 02:57 AM   #1
LQ Newbie
Registered: Oct 2005
Location: India
Distribution: RedHat 7.3, Fedora 4
Posts: 19

Rep: Reputation: 0
script in crontab do not execute or take proper environment of user

On a Linux machine running RH9 which I have only user permissions. I wish to copy a directory files and compile it before start of every day.
I scheduled a crontab job as such by crontab -e

0 10 * * * ~/

If I schedule simple commands as date >>~/x.txt. They get executed, but my script do not execute properly. It have executable flags also set for this file. When I try to print proper environment variables, it do not print $HOST in the script.

My script is as such;
cd /hme/mayank/project/
cvs update -dP
make update

What can be the possible blotch for not execution of this file ??

Thanks and Regards
Mayank Agarwal
Old 07-02-2007, 05:03 AM   #2
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
Ensure somethings

Hi there!
I've got this problem too, and I found out that I missed a \n after crontab line I added. I mean, you'd ensure your crontabline ends with a newline character. Also you'd ensure /bin/bash exists and has executable flags.


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
crontab : why root can't execute ?? bluenectar Linux - General 2 03-12-2007 03:21 AM
Execute script as user sbassett Fedora 1 04-06-2005 10:30 AM
execute a script as a different user JordanH Linux - Software 3 02-08-2005 02:47 PM
how to execute firewall script as normal user robthebob Linux - Security 5 01-11-2005 04:36 PM
boot script execute command as non-root user wampfler Linux - Security 7 09-24-2004 04:56 AM

All times are GMT -5. The time now is 08:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration