Issues with AT Command

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have noticed that when at command is been used to schedule a job in Windows
XP, then if two jobs are scheduled to run at the same time then both the jobs
are assigned the same random number if there is a call to one in the program.

So example:
I have a program which says
echo "Hi"
echo Random is %RANDOM%

if a call to random is made in another program at the same time, then both
get the same value. Is this a bug with scheduling of programs in "AT" or is
it a issue with Random number generation.

ANy help would be appreciated.
 
deeps said:
I have noticed that when at command is been used to schedule a job
in Windows XP, then if two jobs are scheduled to run at the same
time then both the jobs are assigned the same random number if
there is a call to one in the program.

So example:
I have a program which says
echo "Hi"
echo Random is %RANDOM%

if a call to random is made in another program at the same time,
then both get the same value. Is this a bug with scheduling of
programs in "AT" or is it a issue with Random number generation.

ANy help would be appreciated.

Use schtasks.. AT is antiquated(IMHO).
http://www.microsoft.com/resources/.../xp/all/proddocs/en-us/schtasks.mspx?mfr=true

As for the question..
My guess is that %RANDOM% is like most other randomly generated numbers -
not really random. It may be based of time - or something else that makes
it the same if two things call it at exactly the same moment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top