![]() |
|
|
grep unix.com with google
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Our Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
How to use <crontab> in linux
Hi all: I try to set up crontab to run my script at certain time. but I had a problem. basically, my script is located in my home directory of my linux machine. before I run my actual script, I made an experiment. do: Code:
crontab -e * * * * * echo `who am i` >> ~/my.txt and I got nothing in my.txt. The question is since the crontab doesn't recognize who am i, then I don't think it will run my actual script anyway. how to solve this problem? many thanks! |
|
|||
|
when you execute "who am i" in a batch process, you are getting nothing., try executing some other, and specify absolute path of it, you are likely to get output. Code:
* * * * * /bin/ls >> ~/my.txt sadly, the first job you tried itself is giving you trouble, but anyway thats how we learnt unix, enjoy here. |
|
|||
|
Thanks for replying!
it did work for absolute path. I also try echo $PATH, and I got /usr/bin:/bin, which is not my actual environmental variable. what need I do, my actual command need the proper environmental path. just need align the $PATH, then I don't have to attach the proper path every time I try to call some commands. I am a newbie to linux, sorry to ask such silly quesions. Thanks million! Last edited by allenxiao7; 11-27-2009 at 02:08 PM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Crontab | vaish.m.krishna | UNIX for Dummies Questions & Answers | 4 | 09-23-2008 06:39 AM |
| Need help in crontab? | J_ang | Shell Programming and Scripting | 3 | 07-22-2006 02:46 PM |
| crontab | karthikosu | AIX | 4 | 07-15-2006 10:10 PM |
| crontab | sathiyamoorthy | UNIX for Dummies Questions & Answers | 1 | 04-21-2006 05:09 AM |
| crontab | cuarem | UNIX for Dummies Questions & Answers | 4 | 10-08-2002 08:14 AM |