Meaningless Drivel is fun!
The moose likes Linux / UNIX and the fly likes Delete the log using cron job Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Delete the log using cron job" Watch "Delete the log using cron job" New topic

Delete the log using cron job

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
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

This has nothing to do with Java, let alone advanced Java; let's move it to Linux/UNIX.

[Jess in Action][AskingGoodQuestions]
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
See below:

Write CRON Job
Peter Rooke
Ranch Hand

Joined: Oct 21, 2004
Posts: 820

Been a while since I used Sybase, but I think you should be able to turn the the logging off. I know there is an option when you create a new database.

Something I quickly dug up: sybase loggin

Regards Pete
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

There's a facility called logrotate that's explicitly designed to keep logfiles under control. It can keep logfiles in aged generations, starting a new logfile at intervals and/or when the logfile reaches a certain size.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Delete the log using cron job
It's not a secret anymore!