Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to set cronjob/crontab in server using command prompt. Give sample command or sample links.

share|improve this question

migrated from Aug 19 '09 at 0:56

This question came from our site for professional and enthusiast programmers.

crontab -e

edit crontab interactively with your default editor

crontab <file>

replace crontab with contents of given file

General usage help is displayed if you run crontab without arguments, for example:

crontab: usage error: file name must be specified for replace
usage:  crontab [-u user] file
    crontab [-u user] { -e | -l | -r }
    	(default operation is replace, per 1003.2)
    -e	(edit user's crontab)
    -l	(list user's crontab)
    -r	(delete user's crontab)
    -i	(prompt before deleting user's crontab)

More help available via "man crontab".

share|improve this answer
Helpful answer. Thanks :) – Anonymous Aug 18 '09 at 14:04
crontab -e

will work wonders when you’re trying to edit your crontab.

share|improve this answer

The pimlottc's answer looks perfect(+1). But I will left you a link to a little tutorial because you asked for it. cron&crontab-howto

share|improve this answer
Nice. very useful for me... thanks – Anonymous Aug 18 '09 at 14:12

Hi check this link here step by step explan how you can set cron using comman prompt. Its a very gud tutorial for me ...

share|improve this answer
Welcome to serverfault. We prefer to have an excerpt with the relevant information from any links posted. Please edit your post to include the most relevant data from the link. – MichelZ Apr 4 '14 at 6:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.