Can I create a plugin that checks users and grant access to group based on activity?

I’ve not tried it myself, but this plugin by @david ties in to the Jobs module