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?

link|improve this question
That command works for me, actually. – ibid Nov 11 '11 at 15:21
feedback

migrated from stackoverflow.com Nov 12 '11 at 6:55

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

1 Answer

up vote 6 down vote accepted

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

link|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
feedback

Your Answer

 
or
required, but never shown