Scheduler Command Line Option not working

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Scheduler Command Line Option not working

Postby Peter J » Nov 22 06 8:06 am

I'm trying to get the command line option in the scheduler to work without having any success. I've tried many different commands and batch files without any success or error indication.
A couple of things I've tried:
ren c:\test\test.txt end.txt
or
copy c:\program files\wingate\history.* c:\test\

Nothing gets renamed or copied, and I've confirmed the SYSTEM account has the appropriate permissions into these subdirectories. I've also checked the server console (I'm doing this from a remote ws) to ensure no processes or prompts are waiting for input.

The canned events (ie purge audit logs) work fine.

Peter
Peter J
 
Posts: 6
Joined: Nov 22 06 7:49 am

Postby labull » Nov 22 06 8:57 am

Have you turned on Debug logging for the scheduler to see what's happening?
WinGate Lurker
labull
WinGate Guru
 
Posts: 710
Joined: Sep 06 03 1:03 am
Location: Washington, DC - USA

Postby Peter J » Nov 22 06 10:04 am

Yes.
It shows me changing config each time and forcing the event. No other indication of success or failure.
Peter J
 
Posts: 6
Joined: Nov 22 06 7:49 am

Re: Scheduler Command Line Option not working

Postby Nev » Nov 22 06 1:22 pm

Hi,

Just created and tried one task [t] myself and worked AOK.

xcopy \temp\text.txt \dl\ /y

With this log output:

11/22/06 11:17:27 Config changed
11/22/06 11:17:33 Event forced: t
11/22/06 11:17:35 Config changed

Image

System Win2k3 R2 admin log in.

Useless I know but thought I'd try fwiw!
Last edited by Nev on Nov 23 06 7:35 pm, edited 1 time in total.
--
Nev.
Nev
WinGate Guru
 
Posts: 861
Joined: Sep 22 03 11:35 pm
Location: Mudgee ~ NSW ~ Australia

Postby Peter J » Nov 23 06 5:14 am

I tried the same structure but with different subdir names, no change. Debug file shows config change and event force.
What is the reference subdirectory, wingate?

The server - Win 2000 Advanced SP4, running Wingate 6 1 4
I'm accessing it through gatekeeper on an XP box.

Want me to open an email ticket ? It is licenced, I just have to dig out our licence key...
Peter J
 
Posts: 6
Joined: Nov 22 06 7:49 am

Postby adrien » Nov 23 06 2:29 pm

Hi

the WinGate process changes directory to its own one when it starts, so all relative paths should be relative to the WinGate folder, but if in doubt a fully-qualified path should avoid that issue.

Have you tried batch files doing any other thing? Since WinGate service runs in non-interactive mode, you can't see any dialogs popping up anyway. Not sure about launched applications.

Also, ren is a command shell command. The actual executable you'd launch would be cmd.exe. Is there another way perhaps to specify the command line, such as

cmd.exe /C mybatch.cmd

see http://www.ss64.com/nt/cmd.html for more info.


Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Postby Peter J » Nov 24 06 8:37 am

Thanks for the tip about the ren. Xcopy or copy don't need to be called through the shell do they?

I'm trying to copy the history log (history.dbf) before it is rotated.

When the xcopy command didn't work from command line, I tried calling a batch file that had the xcopy command in it. As before, the log showed that I changed config and forced the event, but I didn't get a result.
Peter J
 
Posts: 6
Joined: Nov 22 06 7:49 am

Postby Nev » Nov 24 06 10:28 pm

Peter J wrote:Thanks for the tip about the ren. Xcopy or copy don't need to be called through the shell do they?

I'm trying to copy the history log (history.dbf) before it is rotated.

When the xcopy command didn't work from command line, I tried calling a batch file that had the xcopy command in it. As before, the log showed that I changed config and forced the event, but I didn't get a result.


Hi Peter,

This one runs ok for me:

xcopy C:\PROGRA~1\WinGate\HISTORY.* \dl\ /y

I'd probably backup the registry, deactivate all your keys, remove Wingate and Plugins and then fully re-install again from scratch.

Try the scheduled task before you call the backup registry though as there could be something there prohibiting it perhaps.

Only today I had to fully re install Wingate Version 6.2, KAV wouldn't update and nothing could fix it.

The registry for some reason had grown so maybe their was some dead wood in it somehow, but all working a lot better now starting off fresh again with just a few minor registry imports such as remote mail SMTP gateway and Caching rules.

Sometimes this happens.

My Win2k3 machine also became totally unresponsive today after about ten hours. Not sure just what was behind that as their isn't a log or event pointing to a problem, so it could be the new hardware I'm breaking in perhaps?

Hope this helps.
--
Nev.
Nev
WinGate Guru
 
Posts: 861
Joined: Sep 22 03 11:35 pm
Location: Mudgee ~ NSW ~ Australia


Return to WinGate

Who is online

Users browsing this forum: Bing [Bot] and 7 guests