Home » Infrastructure » Unix » crontab usage (Sun solaris, oracle 10.2.0.3)
crontab usage [message #504346] Sat, 23 April 2011 21:53 Go to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
I am new to crontab. I tried to use the crontab like this :

The script named "script.ksh" contains
echo "welcome"

The script named "script1.ksh" contains
* * * * * /oracle/script.ksh
(run every minute)

$ crontab script1.ksh

I am not able to get any result.
Re: crontab usage [message #504347 is a reply to message #504346] Sat, 23 April 2011 21:56 Go to previous messageGo to next message
BlackSwan
Messages: 21949
Registered: January 2009
Senior Member
The script named "script.ksh" contains
echo "welcome" > /tmp/capture.log
Re: crontab usage [message #504348 is a reply to message #504347] Sat, 23 April 2011 22:16 Go to previous messageGo to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
still not getting the output.
Re: crontab usage [message #504349 is a reply to message #504348] Sat, 23 April 2011 22:30 Go to previous messageGo to next message
BlackSwan
Messages: 21949
Registered: January 2009
Senior Member
>still not getting the output.
Where do you expect/desire to get/see the output?
Re: crontab usage [message #504350 is a reply to message #504349] Sat, 23 April 2011 22:43 Go to previous messageGo to next message
lg123
Messages: 225
Registered: August 2008
Senior Member
I got the output only once. Whereas I have scheduled every one minute. It should execute it every minute.
Re: crontab usage [message #504351 is a reply to message #504350] Sat, 23 April 2011 22:45 Go to previous messageGo to next message
BlackSwan
Messages: 21949
Registered: January 2009
Senior Member
I am NOT standing behind you.

I don't know what you have.
I don't know what you do.
I don't know what you see.
It is really, Really, REALLY difficult to fix a problem that can not be seen.
use COPY & PASTE so we can see what you do & how OS responds.

It works for me.

bcm@bcm-laptop:~$ crontab -l
# m h dom mon dow command
* * * * * /home/bcm/example.sh
bcm@bcm-laptop:~$ cat example.sh
echo "Hello, WORLD" > /tmp/capture.log
ls -l /tmp/capture.log
bcm@bcm-laptop:~$ ls -l /tmp/capture.log
-rw-r--r-- 1 bcm dba 13 2011-04-23 20:58 /tmp/capture.log
bcm@bcm-laptop:~$ date
Sat Apr 23 20:58:11 PDT 2011

[Updated on: Sat, 23 April 2011 22:59]

Report message to a moderator

Re: crontab usage [message #504354 is a reply to message #504346] Sun, 24 April 2011 01:18 Go to previous message
Michel Cadot
Messages: 57612
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This question bears no real connection with Oracle.
Please find a more appropriate forum.
The topic is locked.
If I'm wrong, please, PM me (or report this message to a moderator, explain why you think it should be unlocked and it might be done).

Regards
Michel
Previous Topic: shell script
Next Topic: FTP Problem
Goto Forum:
  


Current Time: Sun Apr 20 01:03:08 CDT 2014

Total time taken to generate the page: 0.10466 seconds