Hey Guys, I know this is a really old thread but I thought I could clear this up for you quickly.
In bash, STDIN redirection using the < or << operator expects a file on the file system as it's right hand argument. So, when you are running:
at now +3 days << /path/scriptname -foo -bar
you are actually telling bash "Open the file /path/scriptname, and dump it's content to the at command". However, the -foo and -bar are considered additional arguments to at, and are passed as such. I'm sure you were getting an error stating that the time you entered on the command line was garbled, or that at didn't understand your parameters.
To accomplish what you want in older versions of bash, you should be using the pipe operator like so:
command1 | command2
This will take the output of command1 and attach it to the input of command2. SO, if you did:
echo "/path/to/script -foo -bar" | at now + 1 min
at would execute, and prepare to schedule a job for one minute from now. THEN, the echo command would run, dumping the path to your program, a carriage return, and then an end of file to at's prompt. At would accept the command, schedule the job, and return to the command line.
Newer version of bash also support inserting a single string into the input stream of a command using the <<< operator, as such:
at now +1 min <<< "/path/to/script -foo -bar"
Which is closer to the syntax you were trying to use originally. You should be careful not to confuse <, << with <<<.
-Dan