News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

What is the purpose of the file cron.php

Started by tectonny, August 13, 2015, 10:38:46 AM

Previous topic - Next topic

tectonny

I see this file, and generating an error, but did not understand what purpose.

Illori

what is the error it is generating? which version of 2.1 are you using? that file is part of the alerts system.

tectonny

SMF 2.1 Beta 2

Visitante
Hoje às 12:20
Tipo de erro: Cron
8: Undefined index: topic_notify   http://www.tectonny.com.br/forum/cron.php
Arquivo: /home/xxxx/public_html/forum/Sources/tasks/CreatePost-Notify.php
Linha: 115

Antes

That fixed in latest-code. Try the latest code from GitHub.


Antes


live627


tectonny


w4rkr4f7

better disable that function for guests because is a waste of bandwidth

file load.php line:
if (empty($modSettings['cron_is_real_cron']))

replace with:
      if (empty($modSettings['cron_is_real_cron']) && !$context['user']['is_guest'])



also editor.js ,jquery.sceditor .... are loaded for guests with no purpose

Illori

the idea is it should run when guests view the forum... it will help to make sure the alerts go through and the emails are sent.

w4rkr4f7

Quote from: Illori on August 13, 2015, 01:54:40 PM
the idea is it should run when guests view the forum... it will help to make sure the alerts go through and the emails are sent.

what alert you expect to have guests ?

Illori

the guests dont have the alerts, they help the process along for your users to get alerts.

Kindred

in other words... 
a) it is not a waste of bandwidth, since it doesn't actually send anything to guests
b) php is a script that is only run when someone activates it....   so, SMF's cron jobs run the next time (after the scheduled task is set) ANYONE (guest, bot or user) accesses the forum

it is coded and working exactly as intended.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: