On Wed, Feb 13, 2002 at 05:11:17PM +0800, [EMAIL PROTECTED] wrote:
>
> Good Day to all!
> I wanna run a shell script at 7 AM and 5 PM in the afternoon, I have been
> testing crontab but its now working.......
> I made a simple script just to test if tis working . It will run every
> minute.
> i typed crontab -e
> then put
> */1 * * * * /dir/test.scr
> save
> make /dir/test.src
> then put
> ls -la
> save
> chmod +x /dir/test.scr
> thats all.....did i missed something.....
Hi!
Why don't you try it? It will work. :-)
You won't see the output of `ls -la` so
you'll have to do it like this:
* * * * * /dir/test.src >/dir/test.out 2>&1
This will redirect the STDOUT and STDERR to /dir/test.out.
Just do `cat /dir/test.out` to view its content.
You don't have to divide the minute field by 1
because */1 = * and it's a good practice to put
the interpreter in /dir/test.scr.
for example:
#!/bin/sh
ls -la
See CRONTAB(5) for more details. Just do
`man 5 crontab`.
HTH
--
$_=q:; # SHERWIN #
70;72;69;6e;74;20;
27;4a;75;73;74;20;
61;6e;6f;74;68;65;
72;20;50;65;72;6c;
20;6e;6f;76;69;63;
65;27;:;;s=~?(..);
?=pack q$C$,hex$1;
;;;=ge;;;;;eval;;;
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]