Solved

Shell Script

Posted on 2002-06-13
6
179 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best software for Unix commands in Windows cmd.exe? 18 102
Search for selected keywords and its values in multiple log files 11 54
cron job says it ran, no results 25 115
UNIX SCP 5 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…
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now