use batch file to write to .txt log

I've got a couple .bat files that are set up on various machines to run at certain times and do various tasks. But how do you check to make sure they're actually running as scheduled? Just log the run as an entry in a .txt file. On the last line of the batch file, use a command like this:

echo batch file was executed at %time% on %date% >> log.txt

This will write the following to your log.txt file:

batch file was executed at 16:39:02.08 on Mon 06/21/2010

Apparently the '>>' in .bat files operates a lot like the pipe '|' in 'Nix shells - pipes the output into a target file.

[a]