I'm trying to run a command in puTTy via SSH and trying to create a crontab... I keep getting errors, but may be just syntax errors, if you see anything specifically wrong please let me know. Basically, I'm just trying to setup cron on Interspire every minute or every 2 minutes on every hour, every day root@host [~]# crontab * * * * * usr/bin/php/home/hpsurvey/public_html/Interspire/upload/admin/cron/cron.php "anaconda-ks.cfg":3: bad minute errors in crontab file, can't install. root@host [~]# crontab */2 * * * * usr/bin/php/home/hpsurvey/public_html/Interspire/upload/admin/cron/cron.php */2: No such file or directory Code (markup):
It's a syntax error. If you want the cron to run every two minutes, it would look something like this: crontab 0,2,4,6,8,10,12,14 * * * * /command The first field where you are using an * is the minute field. In my above example it would run at 12:00, 12:02, 12:04, 12:06, 12:08, 12:10, 12:12, and 12:14, and would repeat that every hour of the day. You can put multiple minute times in this field seperated by a comma. For more info see the following tutorial: http://www.adminschoice.com/docs/crontab.htm
crontab -e This is to edit your crontab file. Then input : */2 * * * * usr/bin/php/home/hpsurvey/public_html/Interspire and save your crontab file.
Due to the newbieness of the poster (no offense intended), I doubt he'll be able to figure out how to exit vi! (i hate that program) That said, try this. CMD1) export EDITOR=nano CMD2) crontab -e (when the editor loads, copy and paste your line, the original line you had was fine) */2 * * * * php -q /home/hpsurvey/public_html/Interspire/upload/admin/cron/cron.php then press ctrl + x and save the file. It'll automatically implement it. You can see existing crontabs under your user by typing 'crontab -l' on the console. If you still have problems with the method above copy and paste the following line into your console and it'll work. echo "*/2 * * * * php -q /home/hpsurvey/public_html/Interspire/upload/admin/cron/cron.php" > crontmp ; crontab crontmp ; rm -f crontmp Code (markup):