• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Write CRON Job

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • 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
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • 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.
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic