# Need a cron job file to execute the PHP script



## furious_gamer (Apr 3, 2009)

Hi guys,
I have a database backup script which works perfectly. Now i need this script to run automatically so that no one is need to take database backup.

Will any of you guys give me a simple cron-file to do this along with a link to how to execute the shell script in the hosting server. Please guys help me....


----------



## furious_gamer (Apr 3, 2009)

^^ You are talking about Corn Job and i am talking about Cron Job...Please read carefully before you post...


----------



## kalpik (Apr 3, 2009)

Use wget.. wget *server.com/path/to/file.php > logfile


----------



## krates (Apr 4, 2009)

if you use cpanel or lxadmin there is some option in it to do cron jobs..


----------



## furious_gamer (Apr 4, 2009)

kalpik said:


> Use wget.. wget *server.com/path/to/file.php > logfile



Will use it....



krates said:


> if you use cpanel or lxadmin there is some option in it to do cron jobs..



Yes, my hosting plan has a cpanel and hurrah! I see a option called Cron Manager there.. Now what i need to do is just write the command and set the interval...


----------



## FilledVoid (Apr 29, 2009)

Reporting Spammer shoe salesman after Rajkumars post.  ^


----------



## amohit (Aug 5, 2009)

rajkumar_pb said:


> Hi guys,
> I have a database backup script which works perfectly. Now i need this script to run automatically so that no one is need to take database backup.
> 
> Will any of you guys give me a simple cron-file to do this along with a link to how to execute the shell script in the hosting server. Please guys help me....



exactly my problem. 
I wrote a backup.php script which dumps the data into a file. Then I email this file as attachment to a backup gmail id. 
saved for ever!
On my system I have a batch script which executes iexplorer.exe <url of the php file>
And i have used windows scheduler to run this batch script.

Regards,
Mohit


----------

