Solved

Shell Script

Posted on 2002-06-13
6
181 Views
Last Modified: 2010-04-21
I need a script that uses the Scheduler mechanism to run a Java file(.class) every 2 hrs.
How do i got abt it.....please help
0
Comment
Question by:rahulkothari
6 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 50 total points
ID: 7076683
crontab -
0 0,2,4,6,8,10,12,14,16,18,20,22 * * * Java file(.class)

 
0
 

Author Comment

by:rahulkothari
ID: 7078205
what does the *** in crontab -
0 0,2,4,6,8,10,12,14,16,18,20,22 * * * Java file(.class)
represent ?
0
 

Expert Comment

by:akhilesh_chadha
ID: 7078755
yaar rahul *** represents futher numbers ,well from which
colleage r u from kindly contact i nedd someone to work in my company
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 20

Expert Comment

by:tfewster
ID: 7078763
(from `man crontab`), the 3rd, 4th & 5th fields are:
monthday       The day of the month, 1-31
month          The month of the year, 1-12
weekday        The day of the week, 0-6, 0=Sunday

* is a wildcard, so ths script will execute every day of the month, every month of the year, every day of the week.

Remember to include the full path to the script, and ensure it sets up all the environment variables it needs, as .profile won't get executed..
0
 

Author Comment

by:rahulkothari
ID: 7079094
akhilesh...gustad20@yahoo.com

thanx guys
0
 
LVL 20

Expert Comment

by:tfewster
ID: 7080938
rahulkothari, please accept ozos comment as an answer to close this question, or post more information if you still need more help...

Thx
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CPU monthly average? 12 132
linux  centos   virtualization network quetion 6 82
What are recommended OS for exim mail server? 10 114
Best way to split and output to csv in bash 2 67
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question