2

i want to execute the command crontab file.txt in java.

What is the procedure...?

4 Answers 4

5

ProcessBuilder is your friend.

Sign up to request clarification or add additional context in comments.

Comments

3

Take a look at Runtime.getRuntime().exec("contrab file.txt")

Comments

1
Runtime.getRuntime().exec("crontab file.txt")

Comments

1

linux commands are essentially programs. You can simply run them using Runtime.getRuntime().exec("crontab file.txt");

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.