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!
Re: How to run script from admin as CRON
Quote:
Originally Posted by
DarkMen
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
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.
Re: How to run script from admin as CRON
Quote:
Originally Posted by
RodG
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
Re: How to run script from admin as CRON
Quote:
Originally Posted by
DarkMen
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
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
Re: How to run script from admin as CRON
Quote:
Originally Posted by
slater555
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?
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.
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.
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