Cron job in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sumeetbiswal
Forum Newbie
Posts: 4
Joined: Tue Feb 28, 2012 3:08 am

Cron job in php

Post by sumeetbiswal »

Hi All,
I am a php developer.I am doing a project which requires some functionality to run automatically in server.So i tried cron job in php.i am very new to cron job in php.I have no control panel password to do it.
i want to write some code in php for cron job and upload it in server throgh FTP.
i want a file runs in every 5 mins every day.
my server API is CGI script.
please anybody help me how to do it and say me the step for cron job for running a php file .
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Cron job in php

Post by Celauran »

You'll need access to the crontab. Generally, cPanel will give you access to that if the host allows it. If you have shell access, you could call 'crontab -e' from the command line, but that seems far less likely.
sumeetbiswal
Forum Newbie
Posts: 4
Joined: Tue Feb 28, 2012 3:08 am

Re: Cron job in php

Post by sumeetbiswal »

Thanks i was also tried for shell access .but not success . plz tell me how to use shell access and how i get it.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Cron job in php

Post by Celauran »

You'll need to contact your hosting provider.
temidayo
Forum Contributor
Posts: 109
Joined: Fri May 23, 2008 6:17 am
Location: Nigeria

Re: Cron job in php

Post by temidayo »

There are services that will help you run the file at interval. You can google running cron jobs with cron tab
or see this article : http://www.dscripts.net/2010/07/27/run- ... n-support/
Post Reply