Running AT command as a different user

Hi,

I have a website that needs to do the following functionality:

On the admin site, a user will enter will enter a datatime. From this, a cronjob (or equivalent) must be created to run "myscript.sh" at that time.

In the php admin page I have this code:

$time = '2010-02-10 15:00:00';
$output = shell_exec("at -f ./myscript.sh $time");

Running that command in shell as "developer" for example, works find and I get the output with the job details etc, and see that job via "atq". However when that command is run by the website (user www-data) the output from that command is null.

Ideally I need to be able to run this commans from browser (user www-data) as a different user (with login credentials) so that I can later log in as that user and view queued jobs and delete them if needed. Is it possible?

My OS is FreeBSD...

Regards,
Katya