Hi, is there a way to setup a cron job to run the auto join groups function? I am using identity manager which creates users automatically when a new user is loaded there. And the auto list is not assigning users. So, thinking to setup a cron job to run this task frequently unless someone knows how to resolve this issue. Thanks
Hi Darshan,
Thank you for purchasing the plugin.Our team will help you with the cron. Is there any way to know the list of newly registered users on your site via the identity manager?
Thank you
BrajeshHi Brajesh,
Could we setup a cronjob to go through all ‘subscriber’ role and auto-subscribe and auto-unsubscribe them based on the auto lists that I create which will have different conditions? If you prefer, I can connect over email.
This way the system can auto join and unjoin automatically?
Thanks
Hi Brajesh,
Please let me know how I can setup Cron job. Thanks
Hello Darshan,
Please look at the following WordPress document that guides you in setting up corn jobs in WordPress. Please check and let me know if it helps or not.
https://developer.wordpress.org/plugins/cron/
Regards
RaviHi Darshan,
At the moment, the plugin runs on the three actions1. On Activation
2. On profile Update
3. On Member type changeIf you want I can add it on another action(a custom one)?( e.g bp_auto_group_user_updated)
You can trigger this action for each user using the cron.
The problem is running a cron and each time checking all users is not efficient or feasible for larger sites(say you have 50 k members).
Using cron is fine as long as there is a way to know a small subset of users for which this event needs to be fired.
Is there a way the plugin you are using for login can add a custom meta to user and we can use that to detect(and after updating them using cron, we can remove this meta).
Please let me know if that is feasible?
Regards
BrajeshHi Brajesh, we might have around 4000 users if everyone joins and it’s an internal only application. Scenario we have is that if a users changes their department or location of work (which will be updated automatically from other system) then their group subscription need to change for the relevant group for the new dept or location to which they belong to. That is why I am thinking of setting up a cron job so it runs and updates user group based on the latest profile.
Hope that helps.
Thanks
Hi Darshan,
Thank you for the details.I have avoided sharing the code due to it being used for larger sites and having the side effect.
I or Ravi will share a complete code example for you by day end tomorrow.
Regards
Brajesh
You must be logged in to reply to this topic.