Advertisement:

Author Topic: Auto Cron Question in General Settings  (Read 1291 times)

nootkan

  • Sr. Member
  • ****
  • Posts: 259
Auto Cron Question in General Settings
« on: November 20, 2016, 12:26:51 am »
Was wondering if someone could explain what the features are that are mentioned in this statement:



Allow Osclass to run a built-in cron automatically without setting crontab                                  It is recommended to have this option enabled, because some features require it.


My site admin seems to stall with it checked and run smoothly when unchecked.

nootkan

  • Sr. Member
  • ****
  • Posts: 259
Re: Auto Cron Question in General Settings
« Reply #1 on: November 23, 2016, 08:32:48 am »
Thanks for the reply. That doesn't tell me which features are affected by the cron though.  I do know how to set up a manual cron when needed.  I just need someone to tell me what the features are that are required as referenced in the statement. Thanks again.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: Auto Cron Question in General Settings
« Reply #2 on: November 23, 2016, 10:20:53 am »
Some stats are recalculated on a cron-basis. Since counting items on the database is "expensive" (in terms of resources), you should not calculate it each time an user ask for it, instead, you precalculate and save it.
IE: numbers of ads per country/region/city/category ... are pre-computed and saved on the database.
There are other actions, like deleting failed uploads, temporary files or purging latest searches. Also, sending alerts to the users who has subscribed.

And that's the core, plugins make use of the cron too for similar actions. Payments Pro for example, uses the cron to clean the database from unpaid carts after several days. Butler plugin uses it to run some actions on the background, without affecting the user experience (deleting inactive listings or users after X days,...)


Think of anything that should happen after a given time of the action (for example: search alerts, remember the user to activate their listing after 2 days, delete an user if he didn't activate their account after several weeks,...) or if the action will take a big time to execute (for example: re-calculating stats), then, it should be in a  cron

nootkan

  • Sr. Member
  • ****
  • Posts: 259
Re: Auto Cron Question in General Settings
« Reply #3 on: December 13, 2016, 05:44:03 am »
Conejo, thanks for the detailed information.  Just what I wanted. ;)