Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I want to be able to output my current crontab to a file, in order to check and append it automatically.

crontab -l > somefile

creates an empty file. There must be a simple way of doing this, right?

share|improve this question

migrated from Nov 12 '11 at 6:55

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

That command works for me, actually. – ibid Nov 11 '11 at 15:21
up vote 6 down vote accepted

This is the correct way, could it be that you have empty crontab? :)

share|improve this answer
Gah, you're right! I thought that when I ran the command that the message crontab usually returns (stating no crontab for <user>) would appear. – radpotato Nov 11 '11 at 15:26
For that to happen you'd need to redirect standard error too. – Michael Krelin - hacker Nov 11 '11 at 15:27
(But you probably don't want it, I see no reason why would you) – Michael Krelin - hacker Nov 11 '11 at 15:28

You must log in to answer this question.