Fork me on GitHub

How do YOU use CRON to run PN API Functions...?  Bottom

  • Does anyone know what includes I would need in order to call PN functions (including Modules) from a CRON-able command...?

    I am wanting to build a module that does something every quarter of an hour to the database, but I don't know what to include or if there is a PN Command Line Interface that I am unaware of...

    Help me if you can...

    --


    With the advent of modern technology, sites like Twitter, and the Facebook Virus...
    I think we should all breathe a collective sigh of relief that I got here in time...
    - randomblink
  • Code

    include 'includes/pnAPI.php';
    pnInit();


    is enough to use pnAPI commands and everything else, you might need to adjust the path depending on where your script is stored.

    See this file as example for cron job started scripts.

    Frank

    --
    "He is not dangerous, he just wants to play...."
  • You are a god...
    Thank you, thank you, thank you...

    --


    With the advent of modern technology, sites like Twitter, and the Facebook Virus...
    I think we should all breathe a collective sigh of relief that I got here in time...
    - randomblink
  • I also said the same thing in your other topic... please don't cross post.

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • You said I am a god???? I cannot remember about this... icon_biggrin

    --
    "He is not dangerous, he just wants to play...."
  • Hammerhead: Click Here

    --


    With the advent of modern technology, sites like Twitter, and the Facebook Virus...
    I think we should all breathe a collective sigh of relief that I got here in time...
    - randomblink

This list is based on users active over the last 60 minutes.