| home | resources | search | news | join | members: 6963 |
Hiveminds | Tue, 2006-05-30 11:00 tags: Tutorials, Webservers TutorialFinding 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 crontabcommandsThe 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 crontab -l crontab -r 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.
00 * * * * wget -q -O /dev/null -nd http://website.com/services/reminders/cron.phpNow press return again so you have a blank line at the bottom. THIS IS
![]() ![]() 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 #!/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
This article brought to you by the
Hiveminds Magazine - Staff. Contact us if you want to post an article or announcement anonymously |
Web Developers London Hotels
Drupal Laptop Reviews
Web Developers Just Dial International Calls
Silverlight Excel Training Courses
Content Management Systems excel courses in london
Joomla! Data Recovery
|
||||||
NewsletterGet updates on Hiveminds services, articles and downloads by signing up for the newsletter. |
Editor's choiceSome of the better articles, stories and tutorials found at Hiveminds. |
Find moreFind more of Hiveminds articles, stories, tutorials and user comments by searching. |
Picked linksHand picked websites and articles from around the web that provide quality reading. |