I would instead do something like
%client.varschedule = schedule(500, 0, eval, "$myvar = 7;");
(btw you also forgot the $)
Then you can later you can do things like
if(iseventpending(%client.varschedule))
cancel(%client.varschedule);
and I believe if the client is deleted, so is the schedule, but I could be mistaken.
Edit: actually probably not unless you do a schedule actually parented to the object with %client.schedule()