From owner-freebsd-questions@FreeBSD.ORG Sun Jan 17 20:48:28 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 C57B7106566B for ; Sun, 17 Jan 2010 20:48:28 +0000 (UTC) (envelope-from dmontalvo@gmail.com) Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mx1.freebsd.org (Postfix) with ESMTP id 990CD8FC0A for ; Sun, 17 Jan 2010 20:48:28 +0000 (UTC) Received: by pwi15 with SMTP id 15so1443348pwi.3 for ; Sun, 17 Jan 2010 12:48:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=6i4br45oRSzbGDzuo3OHjWinehA0dGZket+D8gABjfU=; b=M/kjYk9lpx9kcw8bXvD4yVZnYu93tqEfiVMXPXLoOJJ4zI1bhWh14JBK3w5eVARl0t 0aNs1KgBUYjap7OucjJir0mA2HQjBkDJwQExa41RiNjaGDFs7TIOx6IGUr9QQlZfuE2l VJBuJqGWkGZ5+nfElAl3zLnnIo377RjQ3emps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ZGWyaxYG2YkGTa2Tfw95v/rrZPrY3HOGeDiB6/xLvOeE6hSWtVPsL8MxjCwWFPojVd wx954aOVzCwGhyDpHCfB9lZ21KgfTRGHyh+DQ/8PeO4Koj/NhmRsq0MPcGyotx100md7 kF9fT08aVDNnNbsx8mbp9yUHq4bfoxhpvo9Ao= MIME-Version: 1.0 Received: by 10.143.26.38 with SMTP id d38mr3582752wfj.0.1263761308248; Sun, 17 Jan 2010 12:48:28 -0800 (PST) In-Reply-To: <6DDE69B1-E8FD-4889-ADA6-4F81BC30BC61@olivent.com> References: <91E8AD4B-C321-41C7-BA0E-E89E4D5CE40F@olivent.com> <6DDE69B1-E8FD-4889-ADA6-4F81BC30BC61@olivent.com> Date: Sun, 17 Jan 2010 12:48:28 -0800 Message-ID: From: Diego Montalvo To: mikel king Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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:48:28 -0000 One other question, is there a way to copy the ouput of the crontab "php" file to another file? Simply the "hello world" output and not the code... ?? 2010/1/17 mikel king : > > 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, =A0a php file can run in crontab? =A0doing 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 tha= t > in your script file. > > #!/usr/local/bin/php > > > =A0 =A0 =A0 =A0echo "Hello cruel world!!!\n"; > > ?> > > Remember to chmod +x the script file. > > m! > >