permaculture playing cards*
The moose likes Java in General and the fly likes crontab -e calls within java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "crontab -e calls within java program" Watch "crontab -e calls within java program" New topic
Author

crontab -e calls within java program

jm mccabe
Greenhorn

Joined: Sep 18, 2003
Posts: 1
Hello
I want to create a user cron job from a java program. I know how to make system calls but since the command
crontab -e
opens an editor, I dont think this is possible. It would be great if anybody had ideas or suggestions on this. I looked into the TimerTask class but it is not suitable as it does not guarantee real time.
Help apprecipated,
Julie.
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1817

Just curious, but what is to prevent you from opening the crontab file and appending a new entry to the file (system security, not knowing where the crontab file is, etc.)?
Many years ago I wrote a little utility that would read/write crontab files in Objective-C; maybe I could dig it up and redo it as a Java package.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
 
Consider Paul's rocket mass heater.
 
subject: crontab -e calls within java program
 
Similar Threads
threads
Some cron/crontab stuff
Timing a program
run a Java application every hour automatically
Writing to a crontab file