کد:
[php]Cron task What's a cron task and why do I need one?Create your cron task on our serverCreate your cron task on your own serverTest your cron taskMy cron does not work?! What's a cron task and why do I need one?
On all our commercial versions, AcyMailing can execute automatic processes such as sending your messages (automatic send process of batches of e-mails), generating Newsletters (with the auto-Newsletter), sending your follow-ups (with the campaign system)...For those actions to be executed, AcyMailing needs to be triggered regularly, and each time AcyMailing is triggered, it will check if some tasks have to be executed and then do what needs to be done.A cron task is a system which will automatically trigger AcyMailing without any human intervention.This is a one-time setup... Once done, you won't have to think about it any more and all automatic actions will work.
Create your cron task on our server
As some hosting companies don't enable you to create a cron task on your own server and also because some of our users have no clue what's a cron task, we created a cron service and an easy way to add a cron task directly via your AcyMailing configuration!So, within two clicks, you will be able to create your cron task:Go on your AcyMailing configuration pageClick on the tab Queue process
On this interface, you can set AcyMailing to send X e-mails every Y minutes using the automatic only send process.Please remember the frequency displayed here is just for security (so that your website won't be triggered too often) but this parameter has no impact on the real cron frequency (they both should have the same value).Click on the button Create/Edit your Cron task.A popup will open and you will directly see your cron url added (you don't have to change it!).Make sure the Cron URL is the right one (you should not have to modify this url!)Activate your Cron Task (if you select "Activated : No", Acyba won't trigger your website any more)Select your frequency to meet your needsYou can select either Every 15 minutes, Every 30 minutes or Every 1 hour.This frequency should be the same as (or bigger than) the one you specified on the "automatic send process" parameters.Click on the save button.
That's all you have to do and now our server will trigger your AcyMailing components at the specified frequency.You have to do this procedure only one time, then you can forget about it!On this same popup, you can also see an area Last Report.This area enables you to check if your website has been triggered properly by our server and when.You can see our local time, the next time your website will be triggered and the last report.You can now close this popup Create your cron task on your own server
If you have the possibility and the knowledge to create a cron task on your own server, then you should do it and stop the cron task on our server to be completely independent from our server.You can contact your hosting company for directions on how to set it up on your hosting plan.You should configure the cron on our server (directly via the AcyMailing Configuration page) OR on your server, not both.You should trigger your AcyMailing cron url at a fixed frequency depending on your needs (every 15 minutes is usually a good frequency)You can see your cron url on your AcyMailing configuration page, tab Queue process.
Linux System
You can use one of the following commands depending on your server:lynx -source "http://www.yourwebsite.com/index.php?option=com_acymailing&ctrl=cron" > /dev/nullOrwget -O /dev/null "http://www.yourwebsite.com/index.php?option=com_acymailing&ctrl=cron" > /dev/nullIf you access your website using an httpS protocol, you may want to use this command instead:wget --no-check-certificate -O /dev/null "https://www.yourwebsite.com/index.php?option=com_acymailing&ctrl=cron" > /dev/nullSome hosting company block the lynx and wget command in which case you should use the curl one:curl --silent --compressed "http://www.yourwebsite.com/index.php?option=com_acymailing&ctrl=cron" > /dev/null 2>&1
Test your cron task
We implemented an easy way for you to check that your cron task is working.Go on your AcyMailing configuration page and click on the tab Queue process
On the Report area, you can see an option to have AcyMailing sending you a report each time it is triggered.So you can turn ON this option and once your done with your tests, you can then turn it Off.If you turn ON this option, then AcyMailing will send you an e-mail each time your website is triggered so it should send you an e-mail every 15 minutes (well, depending on your cron frequency).Also, on the Last Cron area, you can see the last time your cron has been triggered, who triggered it and the latest report. My cron does not work?!
If your cron task is not working, you should:Make sure your website can be triggered via your browser:Click on your cron url. That will trigger it manually via your browser so you will see if this url can be reached or not.If you use a third-party SEF component, your website may redirect the current page to the SEF one which will break our own cron service.So you can either configure your SEF component to not transform non-SEF into SEF urls or directly write your sef cron url on our cron interface.Make sure your website can be triggered by the outside:If you have an .htaccess with password protection, your website will obviously not accept to be triggered by an anonymous user.If you use a security component on your Joomla website, this component might block our cron task.RSFirewall: You should disable the DoS protection from the Components > RSFirewall > Configuration > Active scanner configuration options.If you use our own web cron service, you should check that our server is allowed to trigger yours.Our server IP is 46.105.17.43 or 2001:41d0:52:300::2b and we will trigger your server using the domain name http://yourcrontask.comOur server is located in France... if you use RSFirewall or another security component, please make sure this country is not blocked.If your host is SiteGround and you use our own web cron service but get the error "Could not connect to ..." then please contact them with this message and they will be able to unlock the situation:I'm using a web cron service which triggers my website every 15 minutes.The service is not working any more and it's apparently due to the fact their server has been filtered.Could you please make sure that the server 46.105.17.43 or 2001:41d0:52:300::2b are able to trigger my website?They trigger my site from the domain http://yourcrontask.comIf you use our own server to trigger your website, please make sure you enabled our server IP to trigger your website every X minutes! (you might block it if you have some security checks on the number of connections per IP)Sometimes cron jobs can't trigger an url including a "&" or can only trigger a script (instead of an url).In that case, you should create a file called "acymail.php" at the root of your website including the code:Show / hide php code
<?php$ch = curl_init();curl_setopt($ch, CURLOPT_URL,'http://www.yourwebsite.com/index.php?option=com_acymailing&ctrl=cron');curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);curl_setopt($ch, CURLOPT_TIMEOUT, 10);@curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true);curl_setopt($ch, CURLOPT_AUTOREFERER,true);echo curl_exec($ch);curl_close($ch);
Then configure your cron to trigger that script.Please don't forget to replace yourwebsite.com by the url of your own website.If you use CloudFlare, our web cron service may be blocked... you should create a rule in CloudFlare:- PATTERN -YOURDOMAIN.com/index.php?option=com_acymailing&ctrl=cron- RULES -Apps: Off, Performance: Off, Security: Off, Always online: off, Cache level: Bypass cache [/php]
که من حالا بخش هاییشو که متوجه شدم شامل من نمی شدش
علاقه مندی ها (Bookmarks)