From owner-freebsd-questions@FreeBSD.ORG Sun Jan 17 20:10:03 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCDDA1065670 for ; Sun, 17 Jan 2010 20:10:03 +0000 (UTC) (envelope-from mikel.king@olivent.com) Received: from mail.olivent.com (mail.olivent.com [75.99.82.91]) by mx1.freebsd.org (Postfix) with ESMTP id 55F168FC0C for ; Sun, 17 Jan 2010 20:10:03 +0000 (UTC) Received: from localhost ([127.0.0.1]) by mail.olivent.com (Kerio MailServer 6.7.2) (using TLSv1/SSLv3 with cipher AES128-SHA (128 bits)); Sun, 17 Jan 2010 15:10:00 -0500 References: <91E8AD4B-C321-41C7-BA0E-E89E4D5CE40F@olivent.com> Message-Id: <6DDE69B1-E8FD-4889-ADA6-4F81BC30BC61@olivent.com> From: mikel king To: Diego Montalvo In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sun, 17 Jan 2010 15:10:00 -0500 X-Mailer: Apple Mail (2.936) Cc: freebsd-questions@freebsd.org Subject: Re: Running PHP File under Crontab... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jan 2010 20:10:03 -0000 On Jan 17, 2010, at 3:01 PM, Diego Montalvo wrote: > I am using " > > 2010/1/17 mikel king : >> >> On Jan 17, 2010, at 2:30 PM, Diego Montalvo wrote: >> >>> CLI meaning, if I can run and excute in >>> command line, a php file can run in crontab? doing the following >>> in >>> shell: "# php helloworld.php" - "hello world" is produced... >>> >>> Thanks! >>> >>> >> >> >> ok then do you have #!/usr/local/bin/php as your first line of the >> script? >> Or are you using the bash exec command to run the code in your >> shell script? >> >> Also you can try placing the path to the php CLI executable in the >> crontab. If your php executable is in /usr/local/bin then replace /bin/sh with that in your script file. #!/usr/local/bin/php Remember to chmod +x the script file. m!