in reply to Re: On win32 a scheduling task program doesn't work
in thread On win32 a scheduling task program doesn't work

With this syntax:
rsync -av --delete '/from/somewhere' '/to/somewhere' < nul
But Why?


It is useful to know, that I do a redirect of both STDOUT and STDERR on a lo file.
But I don't thing that is related to STDIN:
$| = 1; # no output buffer open LOG, ">", LOG_FILE # LOG_FILE settings are in toConfig.pm or warn "Can't create LOG FILE: $!"; close LOG; open STDERR, ">>",LOG_FILE or warn "Can't redirect STDERR: $!"; open STDOUT, ">>",LOG_FILE or warn "Can't redirect STDOUT: $!";
UPDATE
It seems that all works fine, also without STDIN redirect, if I try to call my Perl program from Windows Scheduled Tasks, with that syntax:

cmd /c "C:\Documents and Settings\saintex\Desktop\saintex-backup\backup.pl" -m alternative

This way is also important to send options to perl file (without 'cmd /c' no options are passed to Perl program).

Thank you all!