Cron task doesn t work for me

  • Posts: 1057
  • Thank you received: 11
  • Hikashop Business
8 years 11 months ago #224869

Hi!
I created a mass action to update the quantity field.
When I use the cron url I get

Γ—
΀ο HikaShop το ΡνΡργοποίησΡ στις 2015-12-22 12:11

Γ—
΀ο σύστημα δΡν ΞΈΞ± ΡνΡργοποιηθΡί πριν τις 2015-12-22 12:11

and the field isn t updated. So I suppose cron task didn t work correctly,
Is there anything else I should do? I remind that if I press the process button in the mass action, everything works fine

Thank you!

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 11 months ago #224872

Hi,

I can't read what you copy/pasted so hard to say much.
I would recommend to follow this tutorial:
www.hikashop.com/support/support/documen...cron-task.html#check
That should help you diagnose what is the problem with the cron task.

Please Log in or Create an account to join the conversation.

  • Posts: 1057
  • Thank you received: 11
  • Hikashop Business
8 years 11 months ago #224972

Thas true I can t read it either.
I tried your tut.
Created a php file with

--?php 
header("Location: http://www.xxx/index2.php?option=com_hikashop&gtask=cron");
exit();
?>
in it but I get
/bin/bash: /dev/nul: Permission denied in my email.
I run it from my server.

Last edit: 8 years 11 months ago by Jerome. Reason: [code] is nice

Please Log in or Create an account to join the conversation.

  • Posts: 1057
  • Thank you received: 11
  • Hikashop Business
8 years 11 months ago #224975

I recreated cron task in my server and I get
=

-2015-12-23 13:26:01--  http://www.xxx/Cron-for-hika.php
Resolving www.webintel.gr (www.xxx)... 148.251.215.217
Connecting to www.webintel.gr (www.xxx)|148.251.215.217|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘/dev/null’

     0K                                                        14.6M=0s

2015-12-23 13:26:02 (14.6 MB/s) - ‘/dev/null’ saved [108]

in my email.
But If I go to button process the mass action in works good. The cron url in problematic for me. I suppose it is my .htaccess file, but is there any change I can do to it to make it work?

here is my .htaccess file
Options +FollowSymLinks

#remove trailing slashes as suggested
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [R=301,L]

## Mod_rewrite in use.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^xxx\.xxx\.xxx\.xxx
RewriteRule (.*) http://www.xxxxxxx.gr/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^www.xxxxxxx.gr$ [NC]
RewriteRule ^(.*)$ http://www.xxxxxxx.gr/$1 [L,R=301]

RewriteCond %{HTTP_USER_AGENT} libwww-perl.* 
RewriteRule .* – [F,L]


Redirect 301 /crm /component/fabrik/index.php?option=com_fabrik&view=list&listid=1


## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
<IfModule mod_deflate.c>
  # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent
</IfModule>
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #224978

Hi,

Please understand that the tutorial explain that it is a workaround.
It is to create a php file and not a bash script.

Before trying that point (where it looks like the documentation have been modify weirdly by some security checks) ; they are multiple other more useful points explained in the documentation.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 1057
  • Thank you received: 11
  • Hikashop Business
8 years 11 months ago #225038

I really can t understand you. I read all the documentation and copy pasted. My cron url doesn t work manually either. I pasted my .htaccess and i don t have other security components, or sef components. Manually as already mentioned i get none latin characters. I check logs too and it shows triggerd

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 11 months ago #225040

Hi,

When I call your cron task manually, it looks like it's working:
take.ms/jrbV5
So the problem is not with security components etc.
I actually checked on our server and the cron from our server is also triggering your website cron properly:
take.ms/S9iHO
So the cron is working as far as I can see.
If you configure the cron tab of the HikaShop configuration to send you an email at each cron being triggered, as explained in the documentation link I gave you, you should get the email, further confirming that the cron task is working.

Might not the problem be with how you configured your mass action ?

Please Log in or Create an account to join the conversation.

  • Posts: 1057
  • Thank you received: 11
  • Hikashop Business
8 years 11 months ago #225108

I don t think so, because my mass action works when I press the process button. I still get encoding problem with the cron page. I saw your image is ok. Why is this happening to me. I checked 2 browsers , 2 computers

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 11 months ago #225112

Hi,

So you said that you checked the tutorial link I gave, right ?
www.hikashop.com/support/support/documen...cron-task.html#check
So, did you get the emails that the cron task was triggered ? That the mass action was executed ?
How did you configured your mass action ? Could you do a screenshot ?

Please Log in or Create an account to join the conversation.

  • Posts: 1057
  • Thank you received: 11
  • Hikashop Business
8 years 11 months ago #225133

Hi!
Would it help if I gave you temp access?
I followed the tutorial yes, but I can t be certain if I did it all ok.
I ll pm you a temp access.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
8 years 10 months ago #225181

Hi,

I just done a test on your website, I created a product with a quantity set to "0" and then called the cron url, and the category set in the mass action was correctly added to the product. So everything seems to be working as expected.

Just one thing, when using the cron with HikaShop cron service, the minimum delay between two cron tasks is 15 minutes.

Please Log in or Create an account to join the conversation.

Time to create page: 0.094 seconds
Powered by Kunena Forum