Sadly, you don't show us what z-last-date.cmd contains, nor do you
reveal what the "prompt" you're receiving actually says.
Looking into the crystal ball, I'd suggest that you're trying to set an
environment variable called "DATE" within z-last-date.
%DATE% is a magic variable, containing the current short-date-string
which depends on your locale. It's likely to contain something like
Thu 01-31-2013.
SET /A won't like trying to set _WW to such a string and is likely to
generate a "Missing Operator" message.
Naturally, the user under which the scheduled job is executed will
determine the date-format used (it's set on a USER basis) and hence YOU
may be executing the job with one format and the Task scheduler with a
different format.
set /? will give you a listing of the magic variables.
SETLOCAL ENABLECOMMANDEXTENSIONS
SETLOCAL DISABLECOMMANDEXTENSIONS
should enable/disable the command-extensions if that is the problem.
set /? will reveal that %DATE% is only filled out automatically if
command extensions are ENABLED.
and you're more likely to get responses and info from alt.msdos.batch.nt
- yours in only the second post in THIS group in the past 2 months...