• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Issues with cron emails

I always set up copies of lists for cron usage, as I inevitably need to apply different pre-filters.

The other thing to bear in mind is ACLs. Because you have no idea who is going to be logged on when a cron job triggers, you have to be careful with ACLs. If your list is (say) visible only to Registered users, but a guest access happens to trigger the cron run, it won't be able to load any rows. So having a copy of the list which has no menu items or other front end visibility, with the row access ACL's relaxed. "Security through obscurity". Not ideal, but better than nothing.

-- hugh
 
Thanks for that tooltip Hugh!

Is there a way to automatically have a list duplicate itself? It would almost defeat the purpose having the cron emails if I would still need to update a list daily.

bj?rn
- from tapatalk
 
Just copy the list.
The copied list is going to the same underlying DB table, so seeing the same data automatically.
upload_2016-8-22_9-19-52.png
 
My list is updated daily
I assume not your list (definition e.g. settings, element definitions, columns...) is updated daily but the data in your list.
Copying a list will NOT copy the database table.

Think of the list as a view - you can have multiple views on the same data (different access setting, prefilters, elements enabled/disabled etc), but always the same underlying DB table.
 
Ok so I copy the list. Setup the prefilter as explained and then change my cron conditions to look at the copied list and the data in the list will still be from the 'live' list?

bj?rn
- from tapatalk
 
and the data in the list will still be from the 'live' list?

Yes. That's exactly what Troester just said:

Think of the list as a view - you can have multiple views on the same data (different access setting, prefilters, elements enabled/disabled etc), but always the same underlying DB table.

Perhaps you could try testing some of this stuff? Questions like that are really easy to answer yourself, with a simple little test setup you can try things out for yourself in. Which is a good idea anyway, rather than trying out new things on your main site.

-- hugh
 
Ok, sorry for the stupid question now. So, I've copied my list. I've set my prefilter. Now, I have 10 cron emails. Will they all automatically use the prefilter from the copied list? And I can remove the specific condition as set in my prefilter from the conditions in the cron email?

Essentially, I would probably want a copy for each cron then adding the specific conditions to the prefilter as opposed to the conditions field?

The email cron will automatically know which prefiltered version to use? *this is where I get confused.

*edit!!! ok, I see now, the copy comes up in the dropdown select where I choose my list. GOT IT! thanks! Will figure this out.
 
Yes, you can remove the condition. That's the whole point of doing it in pre-filters.

Yes, for each cron job with a different set of conditions, create a copy of the list, recreate those conditions in pre-filters, and use that copy for that cron job.

I would also recommend using a different query string word for each cron job, and running wget out of "real" cron to trigger the jobs, on different schedules. That will prevent multiple jobs kicking off on the same page load.

-- hugh
 
Aha. I can see how all this makes it more robust.

My only concern is that multiple copies of a list is going to make for a pretty messy backend with all the copied forms, groups and elements.

bj?rn
- from tapatalk
 
When you copy your lists, we offer to let you rename the form / list / groups. Do so. I usually append something like "(cron job X)" or whatever to the names. This avoids confusion on any dropdowns that list those names.

And we provide all the filters you need to work in the backend, so you only see the "things" you are interested in.

-- hugh
 
Cool. Thanks Hugh.

Seems all is working now as far as I can tell. I still just don't get the notification email for all the crons, only about half of them.
 
Hi Hugh, I finally got around to setting this up. I have crons setup on my server with a wget command fetching the ?fabrik_cron=secret url. They did run, I received the notices from my server. However, if I look at the 'last run' column in Fabrik, then the Fabrik crons did not run. It still shows yesterdays date.

I suspect what might be happening here is the time they are set to run. I have noticed before that the Fabrik crons ignores the Joomla/server time. Just a guestimate. I'm not sure how to work around this?
 
If you trigger your Fabrik scheduled task via a cron job (at fixed intervals) and with fabrik_cron param set (so it won't be triggered by any frontend activity) you can use a small intervall in the scheduled task settings.
 
hi troester. i have set my server crons to run once a day, 5 minutes apart. i set them to run at the same time as the fabrik crons were setup to run. i think that is the issue. maybe i should set the fabrik crons to a few hours earlier?
 
In the Fabrik cron you set the intervall, no fixed time (every 5 minutes...)
So if ( "now" - "last run time" < intervall) the job will do nothing (whereas "now" may be local or UTC - I didn't test if there's an issue)

But if you trigger the Fabrik cron via server wget e.g. once a day you can set the Fabrik cron interval to e.g. 5 minutes. This won't hurt but would make sure that the Fabrik cron is really doing something when triggered.
 
I think I have it the way you explain. I did set them at intervals. Attached are screenshots of my cron setup both on my server, and in fabrik. (I changed all the Fabrik ones to 2 hours earlier and also ran them manually this morning)

I think I can confirm it runs on UTC even though the 'last run' time shows local.
 

Attachments

  • a_screenshot_02.jpg
    a_screenshot_02.jpg
    37.3 KB · Views: 209
  • a_screenshot_03.jpg
    a_screenshot_03.jpg
    36 KB · Views: 201
No, with intervall I mean the "Unit" setting.
What are your tasks' params? (BTW: are they published?)
upload_2016-9-9_16-13-13.png
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top