Shopping Cart Software

Shopping Cart Software ClickCartPro XCS Version
corner image corner image

Creating new cron job

Creating new cron job

Postby zipskins » 25 Feb 2012 20:38

Hi Howard,

I am trying to create a new cron job to run daily. I have added a file to ...apps/gbu0/GBU/tasks_daily, but it causes the admin module of the store to fail, with an error to the effect that KHXC.php cannot find the new job. So presumably it has to be registered somewhere - but where?

Thanks in advance.

Nigel
zipskins
 
Posts: 59
Joined: 21 Oct 2009 07:46

Re: Creating new cron job

Postby GreenbarnWeb » 27 Feb 2012 09:19

Hi Nigel,
Say you want to add a new daily task then you need to copy say the 0200_currencyupdate.php and do the following:
1. Same as 0200_newdaily.php.
2. In the file replace all the currencyupdate with newdaily
Howard Galpin
http://www.greenbarnweb.com
http://www.clickcartpro.co.uk - UK Customised version
http://www.clickcartpro.eu.com - European Customised version
GreenbarnWeb
Site Admin
 
Posts: 1153
Joined: 29 Jul 2009 10:58

Re: Creating new cron job

Postby zipskins » 27 Feb 2012 11:02

Hi Howard,

Thanks for that. I have tried that - copying the 0200_currencyupdate.php to 0200_new_name.php; and have replaced all instances of 'currencyupdate' with 'new_name' in the new file. I haven't made any other changes, so there shouldn't be any problems with the programming as yet, but I still get the error message when I try to access the store:-

Fatal error: Class 'GBU_cron_new_name' not found in .../khxc-private/core/KHXC/KHXC.php on line 1819

I have looked at KHXC.php, but cannot find any direct references to 'cron', so I presume it must be looking for an entry in the database, or another file perhaps?

Thanks in advance.

Nigel
zipskins
 
Posts: 59
Joined: 21 Oct 2009 07:46

Re: Creating new cron job

Postby GreenbarnWeb » 27 Feb 2012 17:05

Hi Nigel,
Try 0200_newname.php
Howard Galpin
http://www.greenbarnweb.com
http://www.clickcartpro.co.uk - UK Customised version
http://www.clickcartpro.eu.com - European Customised version
GreenbarnWeb
Site Admin
 
Posts: 1153
Joined: 29 Jul 2009 10:58

Re: Creating new cron job

Postby zipskins » 29 Feb 2012 08:40

Thanks, Howard. It does seem to be running now, although it's a bit strange that it only works with that particular name. However, I can live with that restriction!

Nigel
zipskins
 
Posts: 59
Joined: 21 Oct 2009 07:46


Return to Other Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron
corner image
Valid XHTML   Valid CSS   w3c wai aa
GreenbarnWeb.com © 2001 - 2013
corner image