XF 2.2 Activity based trigger (Cron Job)

  • Thread starter Thread starter Deleted member 745
  • Start date Start date
D

Deleted member 745

Guest
Hi,

How would this be done where it says on the image (This can be changed to trigger independently of forum activity but additional setup is required.)

1679006071507.webp

I can't use the Server Based Trigger as my host won't go lower than 5mins on the cron jobs.
 
Server based trigger is what it is referring to. Additional setup is required to set up the server based cron. If you can’t use that then you’ll have to continue using the activity based trigger.
 
Server based trigger is what it is referring to. Additional setup is required to set up the server based cron. If you can’t use that then you’ll have to continue using the activity based trigger.
OK, would a 5min cron be ok or would it need to be 1 min for server based trigger?
 
Created a suggestion to allow use of an outside CRON service in addition to the two current methods.

 
You can (sort of) use an "external cron service" - just make it call jobs.php via HTTP.
And it's SO much easier to be able to simply have it call the script needed itself. Yes, there are ways that people that are familiar with writing a script and such can do... but it's also MUCH easier to use the external service to do such. And yes, IPS offers all 3 options for this very reason (ease of use).
Of course, a submitted suggestion for the ability was discounted as
If you send a HTTP request via one of these services once per minute, it will count as activity and trigger the cron jobs to run…
but by the same token you can call the actual PHP file via the CRON service and you don't have to do anything more than link to it (as it already exists) in the remote service. Not everyone has the ease of being able to write a PHP script, nor do all services allow 1 minute calls to a site to show "activity".
 
Last edited:
And it's SO much easier to be able to simply have it call the script needed itself. Yes, there are ways that people that are familiar with writing a script and such can do... but it's also MUCH easier to use the external service to do such. [...] Of course, a submitted suggestion for the ability
Hmm, I am not quite sure what you are trying to explain.

Calling php cmd.php xf:run-jobs from CLI runs a pending job (if there is one) - calling https://forum.tld/job.php does the same and this can (of course) be done via an external service.

So what exact new functionality do you ask for?
 
I use Easy Cron to do the necessary - check it out.

And so did I when I ran IPS.
It was VERY easy to do when I didn't want to set up a CRON job on the VPS. Took all of about 10 seconds.
 
Hmm, I am not quite sure what you are trying to explain.

Calling php cmd.php xf:run-jobs from CLI runs a pending job (if there is one) - calling https://forum.tld/job.php does the same and this can (of course) be done via an external service.

So what exact new functionality do you ask for?
My point is... you get an instruction when you select server... give the SAME option/data for selecting an outside service. There are NO instructions on that in the ACP. You get TWO options. I spent a 2 day period back and forth with a new admin that was not technically savvy enough to understand what was was needed... IF that was an option in the ACP with instructions on how to implement it, he would not have had that issue.
Screen Shot 2023-03-17 at 2.57.41 AM.png


Not EVERYBODY has years of Linux or server admin experience, and some simply can deal only with what a panel tells them to do.
At the least there could be additional information on how to utilize an outside CRON service to do such. With IPS (if I remember correctly) it pretty much gave instructions on how to do it also.
The example you later give proves the very point I was making.
 
My point is... you get an instruction when you select server... [..] Not EVERYBODY has years of Linux or server admin experience, and some simply can deal only with what a panel tells them to do.
Got it :) But this is MHO more of a documentation issue than a missing feature.

So modifying the option description phrase to include smth. like
The activity based trigger can be explicitly activated by making HTTP requests to https://domain.tld/jobs.php.
This can be useful if there is not enough activity on the site to trigger jobs on time and using the Server based trigger is not possible.
should be sufficient?

I can't use the Server Based Trigger as my host won't go lower than 5mins on the cron jobs.
If you can run jobs via server cron this should still work, just setup a job to run
php cmd.php xf:run-jobs --wait --max-execution-time=250 every 5 minutes.
 
Last edited:
Got it :) But this is MHO more of a documentation issue than a missing feature.
Yes, but exactly HOW many will actually read all that "little stuff". If one had an option, with similar basic instructions, it would be "easier" to find, as you and I both know, reading the small print is rarely done by some, they look for the little "block" to check that instructs them how. ;)

IPS does make it noticeable.

Screen Shot 2023-03-17 at 8.23.50 AM.webp
 
Last edited:
Back
Top Bottom