using crontab to run Java programs
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Becky_Givner
Posted On:   Friday, March 30, 2001 08:23 AM

I would like to schedule a Java application that runs on Linux, using crontab.



I have been able to do this manually, using crontab -e, and setting the classpath so that the java command is executed.



My customer would like to be able to edit the hour and minutes that this task is run, through a HTTP request.



Is there a command I can use to edit crontab, that I can execute using Runtime.exec() ?

Re: using crontab to run Java programs

Posted By:   AlessandroA_Garbagnati  
Posted On:   Friday, March 30, 2001 10:26 AM

Becky,

My suggestion is to create your own crontab file in a place that is accessible from your application. Once the file has been edited and modified by your application, just use Runtime.exec() to execute the command
crontab
This will install the given file as a new crontab for that user.
About | Sitemap | Contact