• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Write CRON Job

 
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic