Crontab


#1

Hi, I’m trying to set up a chron job to perform basic maintenance on my site. The thing is, I’m not so sure if DreamHost uses them.

I’ve set up a very basic chron job (using crontab) which should create a simple ‘hello world’ text file, but I get nothing.

So…I’m wondering if DreamHost supports crontabs or not, and if so, how should I go about setting them up?


#2

Thanks for the link, but I’m still not having any luck. Right now, I’m trying the most basic of commands in an attempt to prove that crontabs work:

1 * * * * touch ~/hello.txt

Either, the process that crontab runs as doesn’t have permission to touch anything in my user directory (why wouldn’t it, though if it’s running as me?), or something is wrong with the crontab (but when I save the file I got no error messages), or there’s something else going on.

Is anyone else having similar problems?


#3

My two cron jobs run fine. I’m assuming your waiting till 1 minute past the hour for your job to actualy run?

I have noticed the times are kinda wacky.

I have one short job that runs every 30 minutes “*/30” and the time on the file is :17. and one job that runs at 1:30am and the file time is 1:17.

-Jason

MP3Mystic Your personal Streaming MP3 Server
Dreamhost Hosting


#4

I have four (of the “lynx -dump” variety) that fire hourly just fine fwiw.

[color=#0000CC]jason[/color]


#5

I can’t get it to work either.

I have as perl script that backups my entire home directory.
If I run the script manually, it works fine.
If I set it up in a cron job, nothing happens.

I created a file(backup.sh) that has the crontab info in it. The file looks like this:

00 1 * * * /home/username/backups/backup.pl

I entered it in as:

crontab backup.sh

and when I do a crontab -l, it shows

00 1 * * * /home/username/backups/backup.pl

But, the next day, when I check my directory, no backup is made.

Any ideas? Something I messed up?

Thanks in advance.


#6

Just FYI, but I know this doesnt answer your question) the .snapshot directory (it wont show up on ls just do a cd .snapshot) has hourly and daily backups of all your files right?

-Jason

MP3Mystic Your personal Streaming MP3 Server
Dreamhost Hosting


#7

Yep… I could just grab those… But I like the ability to easily make a tarball of my home directory and then ftp that file to my local machine.