Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    364
    Plugin Contributions
    0

    help question HOW: Call custom script in admin from cron without logging in to admin

    Greetings All,

    I have a php script that pulls in a csv file to update our inventory. The script and csv file are in a sub folder under our admin folder. The script includes application_top.php so it has access to the defines and db. All works great once I'm log into admin and manually call the script. However, I need to create a cron job to do this since we will be updating our inventory at regular intervals.

    My questions is how can I call the script from cron without having to log into zen admin?

    Thanks!
    Experience is what you get when you don’t get what you want…

  2. #2
    Join Date
    Nov 2004
    Posts
    364
    Plugin Contributions
    0

    Default Re: HOW: Call custom script in admin from cron without logging in to admin

    OK,

    I just included configure.php and added my own db connection code since I don't need to use any query_factory.php functions.

    However, if someone else has a better idea...that would be appreciated!

    Thanks!
    Experience is what you get when you don’t get what you want…

  3. #3
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: HOW: Call custom script in admin from cron without logging in to admin

    Most of the time when I write a custom cron script i will NOT put it in the admin folder, my convention is the cron/ folder but then I'll have it execute using the application top from the includes folder.

 

 

Similar Threads

  1. Replies: 10
    Last Post: 16 Dec 2014, 05:09 PM
  2. Converting call from application_top to autoloader! Auction Cron Job
    By davewest in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 29 Jun 2010, 06:22 PM
  3. Replies: 2
    Last Post: 22 Mar 2010, 11:23 AM
  4. I closed out admin without logging out!
    By DaveTabler in forum Basic Configuration
    Replies: 5
    Last Post: 30 Jul 2006, 05:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg