Results 1 to 6 of 6

Thread: Running PHP Scripts with Cron

  1. #1
    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.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    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.

  3. #3
    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.

  4. #4
    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.

  5. #5
    Join Date
    Jan 2008
    Posts
    1,521

    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).

  6. #6
    Join Date
    Apr 2008
    Posts
    2,005

    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).

Similar Threads

  1. Macbook Pro is freezing on ‘Running Package Scripts’
    By ChittiBabu in forum Portable Devices
    Replies: 2
    Last Post: 15-01-2012, 08:59 PM
  2. Running cron on linux even scheduler
    By Sartaj^Crown in forum Operating Systems
    Replies: 5
    Last Post: 03-01-2011, 12:05 AM
  3. Running unix commands within Perl Scripts
    By Ash maker in forum Software Development
    Replies: 5
    Last Post: 09-03-2010, 04:17 PM
  4. An error has occured running scripts on this page
    By Swine Flu in forum Technology & Internet
    Replies: 3
    Last Post: 17-08-2009, 01:21 PM
  5. Scripts not running in crontab
    By Frasier in forum Operating Systems
    Replies: 6
    Last Post: 22-10-2008, 01:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,373,588.20336 seconds with 17 queries