Tutorial
Finding out how to do crontab or any other Unix work on in a Windows environment is like pulling short hairs out with your fingers tips. But I finally found some instruction that worked.
Having been spoiled by Direct Admin and other Control panels with crontab built in I was horrified by the fact that Dreamhost does not provide an interface for doing this simply. But if it is a trade for having shell access then I will take shell access. I avoided commandline crontab and Linux editors because they just take too much time and always seem to be buggy on Windows. After spending a whole day in Nano and Putty I finally got a cronjob placed on the server. But then upon going back to change things Nano and Putty failed. I could not update the crontab file. Luckily there is more ways to skin this cat. You can upload a text file and using Putty have crontab scan it for input.
So now I can get to work on creating those demo sites in Drupal, Joomla and Wordpress that will have resets on the database. Demos for these CMS at opensourcecms.com bug me because they are empty. You cannot get a feel for the CMS this way. Joomla now has nice dummy filler as does Wordpress. Drupal needs to do the same. It does not require a insatller to have good dummy text and users. But anyway back to crontab.
The crontabcommands
The crontab files are not generated by editing a the crontab file in the crontab spool directory, instead the command crontab is used to edit, list, create or remove a crontab file for a user. The crontab command can be used by all the users on a system to create personal crontab as well as by the root account. Users are not allowed to view, edit or create crontab files for other users. Basic commands:
crontab -e
The edit option crontab -e for the crontab command copies or creates the current user's crontab file. After editing is complete, the file is installed as the user's crontab file in the crontab spool directory.
crontab -l
The list option, crontab -l, displays the contents of the current user's crontab file.
crontab -r
The remove option, crontab -r, empties the contents of the current user's crontab file.
Quick Crontab Editing:
The first step is to open a local text editor (such as, write, bbedit, etc).
Switch OFF word wrap if it has this feature.
Next, type in the commands.
The example below executes a web browser call to page cron.php, every 15 minutes.
00 * * * * wget -q -O /dev/null -nd http://website.com/services/reminders/cron.php
15 * * * * wget -q -O /dev/null -nd http://website.com/services/reminders/cron.php
30 * * * * wget -q -O /dev/null -nd http://website.com/services/reminders/cron.php
45 * * * * wget -q -O /dev/null -nd http://website.com/services/reminders/cron.php
Now press return again so you have a blank line at the bottom. THIS IS
VERY IMPORTANT!
- Save the file as a text file, such as, mycron.txt
- FTP to your account, and upload this file as type text to your /home/vs#####
directory. - Now telnet to your account and at the command prompt type
crontab -l (note lowercase
L )crontab mycron.txt


Now, try crontab -l again.
Congratulations. You've created your first crontab!
Example used with log files:Create a text file with the example contents below, edit as necessary and
upload to home directory (crontab executes it, see below):
#!/bin/sh cp vs00000.access.log vs00000.access_old.log cp empty.file vs00000.access.log cp vs00000.error.log vs00000.error_old.log cp empty.file vs00000.error.log
Set permissions of this shell script file to 755.
Then include this line (modify the vs00000 info) in the crontab file:
01 00 * * mon /home/vs00000/shell_script_file_name
Happy Publishing!