aspose file tools*
The moose likes General Computing and the fly likes Write CRON Job Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Write CRON Job" Watch "Write CRON Job" New topic
Author

Write CRON Job

MInu
Ranch Hand

Joined: Oct 09, 2003
Posts: 517
Hai all,

I am using Sybase as my back end for my web application.When i execute some complex quries, the connection will lost or i will not get any responds.I increased the size of the tempdb,then the problem solved.But when the user's start to execute the same query,the same issue will happens.Last I found the reason that the log is writing in every event.So i decided to write a cron job to clear the log frequently.
So please anybody help me to write the cron job to clear the log.

Thanks in advance


God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
I assuming you are using some type of "unix" operating system, so I would start of by using the "man" pages, by typing



Crontab is used to manage the file of scheduled jobs that is executed by the cron process. Each user has their own crontab file.

So, I would suggest you insert whatever command you are going to use to clear the log in a scripting file i.e. perl, korn shell, shell or bash, and have cron execute the script.

If you require root access to remove the log file, then root will have to run the script in their crontab file.


I hope this helps.
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1824

If it is Windows-based, there does exist a CRON port for Windows.

However, since this isn't really JDBC-related, I'm moving it to our General Computing forum


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Write CRON Job