Crontab


#1

hello,

i use winSCP to access to my site in ssh.
i want to execute a php script every day at 01:00 h.

i can’t execute cronjob when i execute this command:

/home/.nur/gandolfi$ 0 0 * * * /usr/local/bin/php -q /home/.nur/gandolfi/bin/cron.php
-bash: line 137: 0: command not found

/home/.nur/gandolfi$ * * * * * /dh/cgi-system/php5.cgi /home/.nur/gandolfi/bin/cron.php
-bash: line 139: cron.file: command not found

/home/.nur/gandolfi$ crontab -e
no crontab for gandolfi - using an empty one
Error opening terminal: unknown.
crontab: “/usr/bin/editor” exited with status 1

thank you


#2

This will be helpful. http://wiki.dreamhost.com/index.php/Crontab

I followed the instructios and successfully set up my crontab script.

Save [color=#CC0000]$97[/color] (max discount) on dreamhost hosting plans using promo code [color=#CC0000]97CRAZY[/color] SignUp NOW


#3

do you use php file ? what ypur command line ?

how to verify if crontab work ?

thank you


#4

conrtab is used in SSH command line usually. I don’t think you should use it in PHP file.

I used it in setting up AWStats for my website. The statistic is updated every 12 hours. That’s how I verify if my crontab works.

More code here Save [color=#CC0000]$97[/color] (max discount) with [color=#CC0000]97CRAZY[/color] SignUp NOW