How to use Tasks

Wrapping my head around tasks, trying to make this setup:

I have table uReg when I have user details with:

UID - user identifier
Current Credits

I want to create a task that will update each months the credits if plan is X,Y,Z respectively. the credits and plan are static number, so I can use the condition “Equal”. Also only users that have status = Active are updated.

Am I doing this the right way, what I have so far:


This last part is where I am stuck with the if condition, I want to update users with X credits when plan is equal to = 1, but how can do a “JOIN” here and get user credits to update when plan = 1? Thank you very much in advance.