Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jan 2013
    Posts
    45
    Plugin Contributions
    0

    Default How to run script from admin as CRON

    Friends, does anybody know, how can I run task/script from admin or admin-folder as automatick task = CRON? I need to run xmlgenerators with CRON, but there I have a problem, that system can't do it. I think the problem is admin acces datas, but I do not know what to do with this.

    Please for help, thank you very much!

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: How to run script from admin as CRON

    Quote Originally Posted by DarkMen View Post
    Friends, does anybody know, how can I run task/script from admin or admin-folder as automatick task = CRON? I need to run xmlgenerators with CRON, but there I have a problem, that system can't do it. I think the problem is admin acces datas, but I do not know what to do with this.

    Please for help, thank you very much!
    Assuming you have cPanel, look under the advanced settings for 'cron jobs' . Select the frequency that you want the job to run (daily, weekly, monthly, etc) , then enter the command you want to run - must be a full path to the file , eg
    "php <space> /home/public_html/zencart/admin/xmlgenerator.php

    This assumes that the file to be run is indeed a php file, and that it has been uploaded to /home/public_html/zencart/admin/ and that its name is xmlgenerator.php

    That's pretty much all there is to it.

    Cheers
    Rod

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,491
    Plugin Contributions
    88

    Default Re: How to run script from admin as CRON

    You could follow the example provided by the /YOUR_ADMIN/currency_cron.php. That sets up an environment (removing the admin-access validation from the plugin's special "loader") where a cron-only PHP script can be successfully run.

  4. #4
    Join Date
    Jan 2013
    Posts
    45
    Plugin Contributions
    0

    Default Re: How to run script from admin as CRON

    Quote Originally Posted by RodG View Post
    Assuming you have cPanel, look under the advanced settings for 'cron jobs' . Select the frequency that you want the job to run (daily, weekly, monthly, etc) , then enter the command you want to run - must be a full path to the file , eg
    "php <space> /home/public_html/zencart/admin/xmlgenerator.php

    This assumes that the file to be run is indeed a php file, and that it has been uploaded to /home/public_html/zencart/admin/ and that its name is xmlgenerator.php

    That's pretty much all there is to it.

    Cheers
    Rod
    Yes, this I know, there is problem to run admin scripts, cause CRON ask for security login. Othere scripts, which are in other folder are without problems... Thanks

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: How to run script from admin as CRON

    Quote Originally Posted by DarkMen View Post
    Yes, this I know, there is problem to run admin scripts, cause CRON ask for security login. Othere scripts, which are in other folder are without problems... Thanks
    OK, first things 1st, CRON doesn't have a 'security login', in fact it is generally configured as a non-login account that is typically initially opened as the root user, and then chownd to the user account - Don't worry if this means nothing to you because unless you are the system admin of the server there is nothing you can do about any of this anyway, and since CRON is such an important service you can safely assume that it has been set up and configured correctly - in other words, "cron" is NOT your problem.

    Please see lat9's response because that is where your problem is most likely to be found and fixed.

    Providing us with a copy of the error messages would go a *long* way to helping solve the issue - I was about to say that this could be an ownership/permission problem with the file(s) but I assume you have reason to have mentioned 'security login' - and that points straight back to lat9's idea about the environment. (a file ownership/permissions issue would not create an error message that has anything about logins as that message implies the file to be executed by cron *has* actually been executed, but can't complete its task).

    Cheers
    RodG

  6. #6
    Join Date
    Jan 2011
    Posts
    374
    Plugin Contributions
    0

    Default Re: How to run script from admin as CRON

    do you know how I can stop cron reports from coming to my phone every night? I do not know what cron is and I have had zen cart for like 8 years and just started getting them about a week ago and they drive me crazy

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,491
    Plugin Contributions
    88

    Default Re: How to run script from admin as CRON

    Quote Originally Posted by slater555 View Post
    do you know how I can stop cron reports from coming to my phone every night? I do not know what cron is and I have had zen cart for like 8 years and just started getting them about a week ago and they drive me crazy
    What message(s) are you receiving?

  8. #8
    Join Date
    Jan 2011
    Posts
    374
    Plugin Contributions
    0

    Default Re: How to run script from admin as CRON

    PHP Code:
    Can't locate Umask/Local.pm in @INC (@INC contains: /usr/local/cpanel 
    /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl 
    /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . 
    /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl 
    /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at 
    /usr/local/cpanel/Cpanel/Mkdir.pm line 10.
    BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/Mkdir.pm line 
    10.
    Compilation failed in require at /usr/local/cpanel/Cpanel/CustInfo/Util.pm 
    line 11.
    BEGIN failed--compilation aborted at 
    /usr/local/cpanel/Cpanel/CustInfo/Util.pm line 11.
    Compilation failed in require at /usr/local/cpanel/Cpanel/CustInfo/Email.pm 
    line 14.
    BEGIN failed--compilation aborted at 
    /usr/local/cpanel/Cpanel/CustInfo/Email.pm line 14.
    Compilation failed in require at /usr/local/cpanel/Cpanel/CustInfo/Save.pm 
    line 14.
    BEGIN failed--compilation aborted at 
    /usr/local/cpanel/Cpanel/CustInfo/Save.pm line 14.
    Compilation failed in require at 
    /usr/local/cpanel/Cpanel/ContactInfo/Sync.pm line 19.
    BEGIN failed--compilation aborted at 
    /usr/local/cpanel/Cpanel/ContactInfo/Sync.pm line 19.
    Compilation failed in require at /usr/local/cpanel/Cpanel/ContactInfo.pm 
    line 16.
    BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/ContactInfo.pm 
    line 16.
    Compilation failed in require at /usr/local/cpanel/Cpanel/QuickInstall.pm 
    line 25.
    BEGIN failed--compilation aborted at 
    /usr/local/cpanel/Cpanel/QuickInstall.pm line 25.
    Compilation failed in require at 
    /usr/local/cpanel/3rdparty/quickinstall/scripts/checkupdates.pl line 8.
    BEGIN failed--compilation aborted at 
    /usr/local/cpanel/3rdparty/quickinstall/scripts/checkupdates.pl line 8. 

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,491
    Plugin Contributions
    88

    Default Re: How to run script from admin as CRON

    That's not coming from any Zen Cart processing, you (or your webhost) has set some cron jobs that are apparently failing.

    Navigate to your webhost's cPanel/Advanced/Cron Jobs to see what is set up.

  10. #10
    Join Date
    Jan 2011
    Posts
    374
    Plugin Contributions
    0

    Default Re: How to run script from admin as CRON

    I talked to my hosting company and they say it is not something from their service. Could it be from the USPS mod or ceon mapping mod or another mod I installed from the zeo plugins? I have
    ceon manual card
    ceon mapping
    USPS
    css dropdown
    column grid layout
    expages footer
    an a third person slide show

    thank you for replying so timely

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 How do I write up an SQL query to run from Admin Panel?
    By GumboStandards in forum General Questions
    Replies: 4
    Last Post: 28 Apr 2015, 03:44 PM
  2. Replies: 2
    Last Post: 9 Nov 2013, 07:09 AM
  3. Replies: 3
    Last Post: 25 Sep 2013, 10:11 PM
  4. Can I run Backup MYSQL Plugin v1.4 via cron job?
    By Renz in forum General Questions
    Replies: 2
    Last Post: 23 Mar 2012, 06:25 AM
  5. How to run a script upon purchase?
    By djex in forum General Questions
    Replies: 2
    Last Post: 6 Feb 2009, 05:26 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR