Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 04-11-2009
Member
 
Join Date: Aug 2009
Posts: 36
Running PHP Scripts with Cron

Can i run a PHP script on cron. If yes then what are the syntax need to define in code as a Web language. If PHP scripts with no executable permissions then what will be the command in corn line.
Reply With Quote
  #2  
Old 04-11-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: Running PHP Scripts with Cron

Cron is a simple Linux module which allow user to run command at regular interval of time. Cron is normally available on all Unix and Linux distributions; if you cannot access it, contact your root or server administrator.Cron enables users to schedule jobs (commands or shell scripts) to run automatically at a certain time or date. It is commonly used to perform system maintenance or administration.
Reply With Quote
  #3  
Old 04-11-2009
Member
 
Join Date: Jan 2009
Posts: 199
Re: Running PHP Scripts with Cron

Run a PHP script on cron : If your PHP scripts do not have executable permissions, 644 or -rw-r--r-- (which is different code for tread permission and write permission ) for example, then as part of the command portion of the cron line, you must specify the php interpreter and pass it the filename of the PHP script.
Reply With Quote
  #4  
Old 04-11-2009
Member
 
Join Date: Dec 2008
Posts: 177
Re: Running PHP Scripts with Cron

With cron jobs, you can exactly plan when a certain command is to be executed. Sure you can create simple scripts for each job and run them all separately via a Unix crontab, but this self-contained script allows running unlimited jobs all from one file.
Reply With Quote
  #5  
Old 04-11-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: Running PHP Scripts with Cron

To get a crontab to call a php script You'll need some basic knowledge of unix shell commands.Users can have their own individual crontab files and often there is a systemwide crontab file (usually in /etc or a subdirectory of /etc).
Reply With Quote
  #6  
Old 04-11-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: Running PHP Scripts with Cron

Scripts to emulate crontab : Pseudocron, a simple PHP script and Fake Cron (you don't have access to Cron, then this CGI will help you by imitating Cron) Yes, you can run in a crontab in php. What you need is php compiled as a cgi (you can have both cgi and apache module).
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Running PHP Scripts with Cron"
Thread Thread Starter Forum Replies Last Post
Macbook Pro is freezing on ?Running Package Scripts? ChittiBabu Portable Devices 2 15-01-2012 08:59 PM
Running cron on linux even scheduler Sartaj^Crown Operating Systems 5 03-01-2011 12:05 AM
Running unix commands within Perl Scripts Ash maker Software Development 5 09-03-2010 04:17 PM
An error has occured running scripts on this page Swine Flu Technology & Internet 3 17-08-2009 01:21 PM
Scripts not running in crontab Frasier Operating Systems 6 22-10-2008 01:33 PM


All times are GMT +5.5. The time now is 02:00 AM.