crontab and path

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers crontab and path
# 1  
Old 11-20-2007
crontab and path

hi All,

here the problem: I'm not able to specify a PATH inside the crontab file.
The only syntax it accepts is the usual "* * * * * file"
I'm not able to add PATH, or HOME, or MAILTO, or anything else.

when I try to save the crontab, I have the error:
"crontab: error on previous line; unexpected character found in line.
crontab: errors detected in input, no crontab file generated."

I can change the file as root, but when I go back as normal user. I obtain the error.

# 2  
Old 11-20-2007
man crontab

or seach the forum for " crontab "

Last edited by Cameron; 11-20-2007 at 06:55 AM..
# 3  
Old 11-21-2007
crontab and path

can u specify it more elobarately

# 4  
Old 11-21-2007
Why not just edit a shell script to do your job? You can set what you want within the script.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies

2. UNIX for Advanced & Expert Users

Command to see the logical volume path, device mapper path and its corresponding dm device path

Currently I am using this laborious command lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}' Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies

3. Shell Programming and Scripting

Generate class path dynamically based on source path

Hi experts, I have multiple file names ending with .jsp located in $SOME_DIR, $SOME_DIR/f1/,$SOME_DIR/f2/test,$SOME_DIR/f3/fa and there are equivalent class files in $SOME_DIR/WEB-INF/classes/_pages,$SOME_DIR/WEB-INF/classes/_pages/_f1,... (0 Replies)
Discussion started by: oraclermanpt
0 Replies

4. Shell Programming and Scripting

Moving files from parent path to multiple child path using bash in efficient way

Hi All, Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created. /Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt /Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies

5. Shell Programming and Scripting

Grep script name with path from crontab

I need help to grep file name with path from crontab ex : 0 5 * * * /tmp/ 2>/tmp/test.log output : /tmp/ Please use code tags next time for your code and data. Thanks (6 Replies)
Discussion started by: jhonnyrip
6 Replies

6. Red Hat

Crontab sourcing PATH?

Hi, Im trying to run script A which requires path /sbin. I have a crontab entry to run script A every 10 minutes. Script A is executed fine by cron, but because script A requires /sbin in its path it fails to run. My situation is script A get overwritten from time to time so I can't modify... (4 Replies)
Discussion started by: wilsonee
4 Replies

7. Shell Programming and Scripting

Reading a crontab 3 * * 1,3,5 /path/of/

Hi! We are on AIX 6.1 TL6 I am an Admin for a Content Management application that is hosted on an AIX machine and i am supposed to come up with a cronjob that runs every monday at 03:00 am. The current schedule of that cron job is : 3 * * 1,3,5 /path/of/ But i do not know... (5 Replies)
Discussion started by: atechcorp
5 Replies

8. Shell Programming and Scripting

Script working when run manually but not in crontab showing path not found

i have a script running using variable defined in .profile when i run that script manually its working but when i run the same script through cron its giving path not found I had defined path in .profile (3 Replies)
Discussion started by: raj_saini20
3 Replies

9. Solaris

cannot add PATH to user crontab file

hi All, here is the problem: I'm not able to specify a PATH inside the user crontab file (/var/spool/cron/crontabs). The only syntax it accepts is the usual "* * * * * file" I'm not able to add PATH, or HOME, or MAILTO, or anything else. when I try to save the crontab, I have the error: ... (1 Reply)
Discussion started by: joe_x
1 Replies

10. Shell Programming and Scripting

Executing Commands From Non-Standard Path (Changing user's PATH secretely???)

Hi: I have a requirement as below: I have some standard Unix commands modified and kept them in a directory say /usr/clsh/bin. For example I have a script named "ls" kept here which is modified version of "ls" (say it always gives long listing i.e. ls -l). When any user logs on and types... (2 Replies)
Discussion started by: ramesh_samane
2 Replies
Login or Register to Ask a Question