Can a script detect when it's being run as a scheduled task?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kent Multer
    Mega Mivite









    • Mar 2006
    • 3252

    #1

    Can a script detect when it's being run as a scheduled task?

    Is there a global variable, system variable, or some other way for a script to determine whether it's being run in a scheduled task, instead of being called "live" by from merchant.mvc, admin.mvc, or one of the other top-level programs?

    Thanks --
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA
  • dcarver
    Director of Software Dev.




    • May 2013
    • 400

    #2
    g.Session:source should be set to "scheduled". Other possible values could be "runtime", "admin", and "api".
    David Carver
    Miva, Inc. | Software Developer

    Comment

    • Kent Multer
      Mega Mivite









      • Mar 2006
      • 3252

      #3
      Thanks!
      Kent Multer
      Magic Metal Productions
      http://TheMagicM.com
      * Web developer/designer
      * E-commerce and Miva
      * Author, The Official Miva Web Scripting Book -- available on-line:
      http://www.amazon.com/exec/obidos/IS...icmetalproducA

      Comment

      Working...
      X