Have you looked at http://msdn.microsoft.com/en-us/library/ms187358%28v=sql.100%29.aspx?
It looks like you are trying to insert a local variable into a SQL Server Agent job.
Based on this section:
[ @command= ] 'command'
The commands to be executed by SQLServerAgent service through subsystem.
command is nvarchar(max), with a default of NULL. SQL Server Agent provides token substitution that
gives you the same flexibility that variables provide when you write software programs.
You may want to try using tokens instead of local variables. This article may be a good starting point for you:
As it points out, your solution will look something like:
@command = 'BACKUP DATABASE MyBackup TO DISK = $(ESCAPE_SQUOTE (@pathName)) WITH INIT'