Anyone know how to get crontab to work?

software development

#1

I just signed up and can’t believe the huge void in documentation regarding ther server configs. No wonder their support is knee-deep in tickets. :slight_smile:

When I run:

‘crontab ~/cronjobs’ I get:

crontabs/tmp.rDwGRW: Permission denied

Anyone know what’s up with that?

(‘cronjobs’ is owned by me and is rw)

Thanks!


#2

I think you’re passing the command incorrectly. You want to take the text file cronjob and import it as the cron file, correct? if that’s the case, then just type:
crontab cronjobs

If not, please explain what you’re trying to accomplish.

-Matttail


#3

I’m having a problem too, no matter if I use the command with a file or calling it via crontab -e.

crontab: installing new crontab
crontabs/tmp.sXoabN: Permission denied
crontab: edits left in /tmp/crontab.Ce34zb/crontab


#4

Try just putting "MAILTO:whatever@example.com" (without quotes) into your cront tab, and see if that works. So, in more detail you’d:

Connect via SSH / Telnet
type: crontab -r
type: MAILTO:whoever@example.com
press Ctrl and O at the same time
press Ctrl and X at the same time

If you still get an error with that as your only thing in the crontab, then you should contact support becuase something not set up right.

If you don’t get an error, then there’s something wrong with your command, and perhaps you can post it here to see if someone knows what’s wrong.

-Matttail


#5

I am having issues as well attempting to add a cron job for our aw stats install -

http://wiki.dreamhost.com/index.php/AWStats_Installation

http://wiki.dreamhost.com/index.php/Crontab

Output ------------------------------------------------------------------

[SERVER]$ crontab -e
no crontab for [SITE] - using an empty one
UW PICO™ 4.9 File: /tmp/crontab.ycSlKV/crontab

0 3 * * * perl
/home/.emmy/[SITE]/awstats/tools/awstats_buildstaticpages.pl
-config=[SITE].com -update
-awstatsprog=/home/.emmy/[SITE]/awstats/awstats.pl
-dir=/home/.emmy/[HOME DIR]/[SITE].com/[DIR]

[ Wrote 5 lines ]

crontab: installing new crontab
"/tmp/crontab.ycSlKV/crontab":1: bad minute
errors in crontab file, can’t install.
Do you want to retry the same edit?

Output ---------------------------------------------------------------


#6

that command must appear on one line. It’s on five right now, so cron think’s it’s five seperate commands. remove any line breaks and make sure it’s not auto wrapping.

-Matttail


#7

Or add a \ to the end of every line that should be connected to the next.