If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > using jt.exe with asp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-09-03, 10:24
kwigmore kwigmore is offline
Registered User
 
Join Date: Dec 2002
Posts: 7
using jt.exe with asp

I am trying to create an asp page the will use the jt.exe to create a scheuduled task from within an asp page.

I can not get the darn thing to work. Here is what I am trying to do:

jtexe= "jt.exe"
shellcmd=jtexe
shellcmd = shellcmd+ " /CTJ StartDate=" & date()
shellcmd = shellcmd+ " StartTime=" & time()
shellcmd = shellcmd+ " HasEndDate=0"
shellcmd = shellcmd+ " KillAtDuration=0"
shellcmd = shellcmd+ " Disabled=0"
shellcmd = shellcmd+ " Type=daily"
shellcmd = shellcmd+ " /SC kwimgore Uqbn#A#CXC"
shellcmd = shellcmd+ " /SJ ApplicationName=test"
shellcmd = shellcmd+ " WorkingDirectory=c:/"
shellcmd = shellcmd+ " Creator=kwigmore"
shellcmd = shellcmd+ " Priority=Normal"
shellcmd = shellcmd+ " MaxRunTime=3600000"
shellcmd = shellcmd+ " DontStartIfOnBatteries=0"
shellcmd = shellcmd+ " KillIfGoingOnBatteries=0"
shellcmd = shellcmd+ " RunOnlyIfLoggedOn=0"
shellcmd = shellcmd+ " SystemRequired=0"
shellcmd = shellcmd+ " DeleteWhenDone=1"
shellcmd = shellcmd+ " Suspend=0"
shellcmd = shellcmd+ " StartOnlyIfIdle=0"
shellcmd = shellcmd+ " KillOnIdleEnd=0"
shellcmd = shellcmd+ " RestartOnIdleResume=0"
shellcmd = shellcmd+ " Hidden=0"
shellcmd = shellcmd+ " TaskFlags=0"
shellcmd = shellcmd+ " /SM \\saturn"
shellcmd = shellcmd+ " /SAJ test"
shellcmd = shellcmd+ " /SAC test"

shell "%COMSPEC% /e:1024 /c " & shellcmd


Can some one please let me know what I am doing wrong.

Thanks
Kim
Reply With Quote
  #2 (permalink)  
Old 06-16-04, 08:59
oneted oneted is offline
Registered User
 
Join Date: Jun 2004
Posts: 1
jtexe= "jt.exe"
shellcmd=jtexe
shellcmd = shellcmd & " /CTJ StartDate=" & formatdatetime(date(),2)
shellcmd = shellcmd & " StartTime=" & formatdatetime(time(),4)
shellcmd = shellcmd & " HasEndDate=0"
shellcmd = shellcmd & " KillAtDuration=0"
shellcmd = shellcmd & " Disabled=0"
shellcmd = shellcmd & " Type=daily"
shellcmd = shellcmd & " /SC kwimgore Uqbn#A#CXC"
shellcmd = shellcmd & " /SJ ApplicationName=test"
shellcmd = shellcmd & " WorkingDirectory=c:\"
shellcmd = shellcmd & " Creator=kwigmore"
shellcmd = shellcmd & " Priority=Normal"
shellcmd = shellcmd & " MaxRunTime=3600000"
shellcmd = shellcmd & " DontStartIfOnBatteries=0"
shellcmd = shellcmd & " KillIfGoingOnBatteries=0"
shellcmd = shellcmd & " RunOnlyIfLoggedOn=0"
shellcmd = shellcmd & " SystemRequired=0"
shellcmd = shellcmd & " DeleteWhenDone=1"
shellcmd = shellcmd & " Suspend=0"
shellcmd = shellcmd & " StartOnlyIfIdle=0"
shellcmd = shellcmd & " KillOnIdleEnd=0"
shellcmd = shellcmd & " RestartOnIdleResume=0"
shellcmd = shellcmd & " Hidden=0"
shellcmd = shellcmd & " TaskFlags=0"
shellcmd = shellcmd & " /SM \\saturn"
shellcmd = shellcmd & " /SAJ test"
shellcmd = shellcmd & " /SAC test"

vbscript (asp) need '&' instead of '+'
we hope that this will help you
Reply With Quote
  #3 (permalink)  
Old 06-17-04, 13:06
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
And there is no "shell" command in ASP... you need to do:

Code:
Dim objShell
Set objShell = Server.CreateObject("WScript.Shell")
objShell.Exec(shellcmd)
Set objShell = Nothing
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On