Web Hosting Talk







View Full Version : cron jobs?


saghir69
12-19-2004, 08:35 PM
hi end help with seting up 2 corn jobs


i have cpanel

1) i just need to run a php file every hour , but i added the full path including the domain in the job box in cpanel and i got a email saying no such file or directory available


2) i want to turncate a table at 12.00 every night how will i do that? do i have to create a php file for that too and get it run at 12:00

Angelo
12-20-2004, 07:45 AM
1) Your cron command should look like
php -f /full/path/to/your.php

2) I cant remember if there is an option to truncate at mysqladmin command, you can use that if there is, or you can do like the way you say.

saghir69
12-20-2004, 08:19 AM
^ does the full path include the domain name too?

coz at the moment i have it set with the domain name and it sends me a email every hour that no such file found

Angelo
12-20-2004, 08:26 AM
Whats your cron command now? It does not have to be something related to domain. Something like:

php -f /home/User_name/public_html/any.php

If you have uploaded it in a public_html folder of any of your users.