1. kingnature
  2. RO CSVI
  3. Friday, 15 January 2016
  4.  Subscribe via email
Hi there

We upgraded from CSVI 5.2.1 to CSVI 6.4.3. We created a new template and everything is working except the jform command from the cronjob to have a certain range of date in the export file. We have changed the cronjob accordingly to your website.

Old cronjob (which worked for years):

/usr/local/bin/php /home/xxx/www/xxx/administrator/components/com_csvi/helper/cron.php username="USER" passwd="PW" template_id="1" jform:order:orderdatestart=$(date -v-5d +"\%d-\%m-\%Y";) >/dev/null 2>&1

New cron job:

/usr/local/bin/php /home/xxx/www/xxx/administrator/components/com_csvi/helper/cron.php username="USER" passwd="PW" --key="winter" --template_id="1" jform:order:orderdatestart=$(date -v-5d +"\%d-\%m-\%Y";) >/dev/null 2>&1

The new cron job generate the file but with all orders from the whole database. It looks as the jform command is not working anymore with CSVI 6. Can you give us a hint?
Accepted Answer Pending Moderation
The cron job is now working without error. But it exports the full xml. Not just the last 5 days. It might be the command must be different then the one we have put in.

Actual command
--form.orderdatestart=$(date -v-5d +"\%d-\%m-\%Y";)

Any ideas?
  1. more than a month ago
  2. RO CSVI
  3. # 21
Accepted Answer Pending Moderation
Ha,

So the command line argument is working but I sent you a too new of a file. I have attached the cron file for your CSVI version. That should make it good to go.
Attachments (1)
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 22
Accepted Answer Pending Moderation
Hello,

I did accordingly and have copied the cron.php to the right location on the server.

Here is my new php line:

/usr/local/bin/php /home/xxx/www/xxx/administrator/components/com_csvi/helper/cron.php username="User" passwd="pwd" --key="key" --template_id="1" --form.orderdatestart=$(date -v-5d +"\%d-\%m-\%Y";)

But now the following error occurs:

Use --help to see the help information
Processing started...
Template virtuemartxml
PHP Fatal error: Call to undefined method CsviHelperTemplate::getEnabled() in /home/emetal1/www/http://kingnature.ch/administrator/components/com_csvi/helper/cron.php on line 239

Fatal error: Call to undefined method CsviHelperTemplate::getEnabled() in /home/emetal1/www/http://kingnature.ch/administrator/components/com_csvi/helper/cron.php on line 239
  1. more than a month ago
  2. RO CSVI
  3. # 23
Accepted Answer Pending Moderation
Hello,

Attaches is a new cron patch file that you can load via the Maintenance menu. Once you have that done, the option to add command line parameters can be used again.

The parameters will need to be added in the form of:
--form.orderdatestart=xxx


Give that a try and let me know how it goes.
Attachments (1)
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 24
Accepted Answer Pending Moderation
Hello,

We need the cron job to run all 5 Minutes. And on each run must have the output of the last 5 days. So last run does not work.
Is there another possibility?
  1. more than a month ago
  2. RO CSVI
  3. # 25
Accepted Answer Pending Moderation
Hello,

The jform format no longer works in CSVI 6 indeed. Which date range is that? I can't get that code to work to get me a range.

What you can do, is set the Date range in the template to Last Run and in your cron job schedule how often you want to run it, for example every 5 days (guessing from the date syntax). That should give you the same output.

Or do you want to run this every day and get the last 5 days?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 26
  • Page :
  • 1
  • 2


There are no replies made for this post yet.
Be one of the first to reply to this post!