Which is the advantage of using CakePHP Console / Shell for programmed tasks ?

查看原文

最近用到了cakephp中的shell,但是不知道为什么要用shell,所以到google了一下,找到了一份比较满意的答案,在这里记录下。

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

另: Some disadvantages of a web script I can think of are:

  • the execution time is limited by the webserver
  • the memory it can consume is limited by the webserver
  • the script URL has to be protected in order to get executed only when YOU want
  • obviously the webserver has to be up and running when you want to call your script

cakephp 中Console / Shell 有什么优点?的更多相关文章

  1. linux c程序中获取shell脚本输出的实现方法

    linux c程序中获取shell脚本输出的实现方法 1. 前言Unix界有一句名言:“一行shell脚本胜过万行C程序”,虽然这句话有些夸张,但不可否认的是,借助脚本确实能够极大的简化一些编程工作. ...

  2. Jenkins 六: 构建中执行shell或者 windows的批处理程序

    Shell/ bat Jenkins 可以在构建中执行shell命令或者windows的batch 命令. 1. 选择一个项目,点击“配置”. 2. 找到“构建” –> “增加构建步骤”.选择 ...

  3. linux C程序中获取shell脚本输出(如获取system命令输出)

    转载自 http://blog.csdn.net/hjxhjh/article/details/7909518 1. 前言 Unix 界有一句名言:“一行shell脚本胜过万行C程序”,虽然这句话有些 ...

  4. yum(Fedora和RedHat以及SUSE中的Shell前端软件包管理器)命令详解

    yum官方网站:http://yum.baseurl.org/ Fedora对于yum的介绍:http://fedoraproject.org/wiki/Yum yum(全称为 Yellow dog ...

  5. Linux中的shell

    shell的含义: 首先shell的英文含义是"壳": 它是相对于内核来说的,因为它是建议在核的基础上,面向于用户的一种表现形式,比如我们看到一个球,见到的是它的壳,而非核. Li ...

  6. makefile中的shell语法

    在Makefile中写shell代码有点诡异,和不同的shell语法不太一样,如果不了解,看Makefile会莫名其妙.下面总结了一些. 1:尽在Makefile文件的目标项冒号后的另起一行的代码才是 ...

  7. python中写shell(转)

    python中写shell,亲测可用,转自stackoverflow To run a bash script, copy from stackoverflow def run_script(scri ...

  8. Awk中调用shell命令

    Awk中调用shell命令 需求 在awk中,有时候需要调用linux系统中命令,如计算字符串的MD5值,并保存下来. 方法参考 call a shell command from inside aw ...

  9. vim中执行shell命令小结

    vim中执行shell命令,有以下几种形式 1):!command 不退出vim,并执行shell命令command,将命令输出显示在vim的命令区域,不会改变当前编辑的文件的内容 例如:!ls -l ...

随机推荐

  1. UPDATE SQL 不同环境执行结果不一样

    背景:1.前台:JQUERY 提交数据 2.后台:OWIN C#  处理接收数据 3.数据库: postgresql ========================================= ...

  2. vue-实现一个购物车结算页面

    这是路由之间的跳转,传递值最好采用传参,而不是用$emit和$on,不起作用 如果实在一个页面中的兄弟组件,可以使用$emit和$on 中间件,eventBus.js 放在components目录下面 ...

  3. mysql配置jdbc

    jdbc.driverClassName=com.mysql.jdbc.Driverjdbc.url=jdbc:mysql://localhost:3306/database?useUnicode=t ...

  4. codevs 4052 黎恒健大战YJY

     时间限制: 1 s  空间限制: 32000 KB  题目等级 : 黄金 Gold 题目描述 Description 现在,黎恒健与YJY由于身处异地,非常迫切地想在最短的时间内相遇,然后干一架.但 ...

  5. C基础的练习集及测试答案(40-50)

    40.(课堂)打印杨辉三角型前10行 #if 0 40.(课堂)打印杨辉三角型前10行 思路分析: 一.打印十行杨辉三角得第十行长度为十,所以建立一个长度为十的数组,作为每行的数据存储 二.按 0-9 ...

  6. Codeforces Round #327 (Div. 2) C Median Smoothing(找规律)

    分析: 三个01组合只有八种情况: 000 s001 s010 0011 s100 s101 1110 s111 s 可以看出只有010,101是不稳定的.其他都是稳定的,且连续地出现了1或0,标记为 ...

  7. fread, fwrite - 二进制流的输入/输出

    总览 (SYNOPSIS) #include <stdio.h> size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stre ...

  8. python_61_装饰器4

    import time def timer(func):#timer(test1) func=test1 def deco(): start_time=time.time() func()#run t ...

  9. Excel坐标点转线

    IWorkspaceFactory pShpWksFact = new ShapefileWorkspaceFactory(); IFeatureWorkspace pFeatWks; pFeatWk ...

  10. centos 6 安装VMware Tools

    开启虚拟机的centos系统, 在虚拟机工具栏点击 “虚拟机”=>VMwareTools安装,  centos系统内的桌面会有一个VMware Tools的驱动光驱, 双击打开后,有一个tar. ...