PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, April 22, 2022

[FIXED] Which is the advantage of using CakePHP Console / Shell for programmed tasks

 April 22, 2022     cakephp, cakephp-2.2, cakephp-2.3, cron     No comments   

Issue

I am currently executing a programmed task calling directly to a Controller action by URL. (using the windows 2003 server programming task manager)

I've seen some people use the CakePHP console or shell for this kind of operations.

Which is the advantage of using it if any?

My action is currently calling multiple controllers and making use of a vendor library.

Thanks.


Solution

Here are a few reasons that come to mind:

  • A shell isn't publicly accessible, where a url (generally) is
  • A shell doesn't hit your webserver
  • The shell dispatch process has less overhead
  • Shell output is easier to log error vs. output

I could go into separation of concerns, but that's usually opinion-driven. I think the first two points are reason enough.



Answered By - jeremyharris
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing