weblance
Here's some clues & suggestions
To view the settings for a user
db accounts show username
(replace username with the obvious)
Put these commands into a file eg VPNon.sh
db accounts setprop username VPNClientAccess yes
signal-event user-modify username
Put these commands into a file eg VPNoff.sh
db accounts setprop username VPNClientAccess no
signal-event user-modify username
Then create cron jobs to run at certain times to run each script, remember to give executable permissions to the files.
Search here for cron jobs, there is also a cron job contrib, or refer to this specific example for another purpose. Just copy the methodology
http://wiki.contribs.org/Backup_with_dar#Backup_disk_size_limits_workaround