Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 42,388 of 42,547    |
|    Ammammata to All    |
|    Re: scheduled task: batch file doesn't r    |
|    17 Jun 24 09:31:34    |
      From: ammammata@tiscali.it              JJ brought next idea :       > You misunderstood the problem. That problem has nothing to do with the       > problem in your batch file.              > Your problem is an entirely different problem. But since you didn't mention       > how exactly, your batch file "doesn't work"              my fault :(              checking the event log, I see 7 entries:       (translated into English)              - activity activated by scheduler       - message received (credentials)       - activity activated       - action activated (the batch file)       - activity process created (cmd.exe)       - action completed (cmd.exe)       - activity completed              The scheduled task completes in 1 second and of course nothing happens:       no copy from NAS to local folder, no upload to remote disk with curl,       the LAN/WAN are NOT so fast                     > Here... if the file/folder enumerated by the `FOR` command contains a space       > or special character such as `&`, curl won't be executed as inteaded. To fix       > it, the `%%F` must be double-quoted. i.e.:       >       > curl -T "%%F" ftp://%USERNAME%:%PASSWORD%@%FTP_URL%%REMOTE_DIR%       > --ftp-create-dirs       >              Hi              I would try this one first, but note that among the 37 files I must       transfer, there are 25 whose name begins with $$; the rest are only       letters and digits, no spaces, no hyphen, no underscore, nothing else       that's not [A-Z0-9]              > In Windows, when specifying a file system path, it should always be       > double-quoted if it's not already double-quoted. Especially if the path is       > unknown, or may vary, or can be anything.       >              for what concerns the path, I strongly avoided all spaces and non       alphanumeric characters, why should I complicate my life when I can       keep things simple?              as I stated, the batch file runs without errors when manually executed              I also made a single-day version, removing the for /f "tokens=2       delims==" %%i in... command and manually setting dow=1 (day of week,       1=Monday)              well, it works (manual) and doesn't (schedule)                     at this point I'll search a third party tool to bypass the scheduler                     --       /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\       -=- -=- -=- -=- -=- -=- -=- -=- - -=-       ........... [ al lavoro ] ...........              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca