 | News Feed |
Sections
|
| feed this: |  |
Developer Tutorials Blog: Running PHP cron jobs - regular scheduled tasks in PHP
by Chris Cornutt May 16, 2008 @ 09:32:25
On the Developer Tutorials blog, Akash Mehta has posted an introduction to working with command-line PHP scripts and cron jobs for site automation.
Scheduled tasks are a fairly common feature in modern web applications. From cleaning out caches every 24 hours to checking subscription periods and even generating reports, more web applications live by the clock than ever before. But how do we schedule the execution of a PHP script on the server side?
He shows the two key things to getting it working - an example of a command-line call to a PHP script (executed through his /usr/bin/php) and an example of a line from a crontab showing how to execute the script at midnight every day.
voice your opinion now!
cron job crontab commandline execute schedule task tutorial
Developer Tutorials Blog: Testing PHP with the interactive shell
by Chris Cornutt May 12, 2008 @ 07:57:34
Akash Mehta shares a helpful hint in this new post to the Developer Tutorials Blog today - testing out PHP code via the command line PHP binary.
Thankfully, PHP provides the interactive shell, allowing you to test out PHP interactively with immediate feedback. Here's how to take advantage of this mature feature of PHP.
With the help of the "-a" flag on the command line, the PHP binary will hand you an environment where you can code PHP and instantly see the results. He does mention a few quirks that make it different than working with PHP through a web server, namely moving in and out of code blocks and remembering to finish out with a semi-colon when the line is done.
voice your opinion now!
test interactive shell binary tutorial commandline
Debuggable Blog: Running Tests from The Commandline in CakePHP
by Chris Cornutt May 08, 2008 @ 10:27:41
New on the Debuggable blog today there's this post from Tim Koschutzki about a new feature he's contributed back to the CakePHP project. It allows you to run tests on the command line without having to worry about loading up a web interface to check your code.
It allows you to run all of the following: all core testcases at once, all core test groups, each core test case individually, all application-specific testcases at once, all application-specific test groups and each core test case individually. It also supports plugins, which means you can run plugin cases and groups.
He includes some samples of how it works - a few command line calls and what the output looks like.
voice your opinion now!
test unittest commandline cakephp framework testsuite
|
Community Events
Don't see your event here? Let us know!
|