task scheduler

G

Guest

We are using window2003 scheduler to run the same batch file at 2:00a
3:00am,4:00am,5:00am, 6:00am and 7:00am on a daily schedule. The schedule
task = daily, start time =1:35am on 8/2/2004, every 1 days. Under settings we
have stop task if runs for 72 hrs, no advanced schedule option. This process
works every day of the week except Sunday night. When we come in on Monday
none of the scheduled tasks are running and we have to start them manually. I
don't know fi it means anything but the scripts are java scripts (payment
clients) that create a transaction path between our touchnet payment gateway
and our e.r.p system. This allows students to pay on-line at anytime of the
day.It's been running like this since 8/2/2004, my predecessor couldn't
figure out why the jobs don't run Sunday night.
Any suggestions would be appreciated.
 
P

Pegasus \(MVP\)

don said:
We are using window2003 scheduler to run the same batch file at 2:00a
3:00am,4:00am,5:00am, 6:00am and 7:00am on a daily schedule. The schedule
task = daily, start time =1:35am on 8/2/2004, every 1 days. Under settings we
have stop task if runs for 72 hrs, no advanced schedule option. This process
works every day of the week except Sunday night. When we come in on Monday
none of the scheduled tasks are running and we have to start them manually. I
don't know fi it means anything but the scripts are java scripts (payment
clients) that create a transaction path between our touchnet payment gateway
and our e.r.p system. This allows students to pay on-line at anytime of the
day.It's been running like this since 8/2/2004, my predecessor couldn't
figure out why the jobs don't run Sunday night.
Any suggestions would be appreciated.

If you want the batch file to run at 2, 3, 4, 5, 6, 7 then you should
schedule one single job with these characteristics:
- Schedule task: Daily
- Start time: 2:00 am
- Repeat: every 1 hour (under "Advanced")
- Duration: 5 hours 59 minutes
This will fix your problem.
 
G

Guest

Is there some particular reason it won't run on monday morning but will run
every other day the way it is ???
 
P

Pegasus \(MVP\)

The durations of your tasks are far too long and overlapping,
causing unpredictable results.
 
G

Guest

After making the changes that you suggested, nothing runs. I used one of the
old jobs and made the changes you suggested. Then i created a brand new job
and the only thing I see running is MTTask.exe.

Don
 
P

Pegasus \(MVP\)

You're obviously missing a few steps. Create a batch file like so:
@echo off
echo %date% %time% >> c:\test.txt

then do this to run it once every 5 minutes:
1. Control Panel / Task Scheduler
2. Add Scheduled Task.
3. Specify the name of the above batch file.
4. Give the baby a name.
5. Select the "Daily" radio button.
6. Set the time to 0:00, and select "Every Day".
7. Enter the account details.
8. Click "Advanced properties" + Finish
9. Click "Schedule".
10. Click "Advanced".
11. Repeat the task every 5 minutes, and make the duration 24 hours.

Now check c:\test.txt and convince yourself that the task
does run every 5 minutes. When it works as expected,
apply the above methods to your own batch files.
 
G

Guest

When you run a batch job, it shows up on the windows task bar. When you run
it thru the scheduler does it also show up on the task bar? I see mstask.exe
running and when I open the dos window i see multiple executions of the batch
file I want to run.
 
P

Pegasus \(MVP\)

What is your question?

Did you schedule the batch file I suggested?
What happened?

Task that run under the Task Scheduler are designed
to run in the background and are designed to be
invisible to the foreground question.
 
G

Guest

I scheduled the bath job as you suggested and it worked. I had created one
similar to it to run the job every 1 hour for 5:59 starting at 2:00am, which
worked up until saturday and then it quit. So maybe i told it to run daily
instead of every 1 day, in any case i created a brand new job to run every 1
day to start at 2:00am for a duration of 5hr and 59 mins. Since the job runs
in the background can you suggest aa way that i can see if the job is running
when i come in, in the morning.
 
P

Pegasus \(MVP\)

Check the Windows Task Scheduler. It tells you exactly which
jobs are currently running, when a job last ran and when it will
run again. Make sure to get the "Details" view on your screen.
 
G

Guest

When i run the job 'echo %date% %time% >>c:\payment_client_is_running.txt'
and i schedule it to run every minute for 10 minutes, it creates an entry in
the .txt file each time it runs. If i put this same statement in the batch
file I'm trying to run every hour for 5 hours starting at 2:00am, it only
puts one entry in the .txt when it starts up. This is the batch file:

@echo offrem SCT Payment Client Startup for Banner Webrem AUDIT TRAIL:
echo %date% %time% >>c:\payment_client_is_running.txt
rem Touchnet jar - for TouchNet customers
set CLASSPATH=D:\app\sct\ssb\LCCC\java\SCTTransactor.jar

rem SCT Payment Client Jar - everyone
set CLASSPATH=%CLASSPATH%;D:\app\sct\ssb\LCCC\java\SctPaymentClient.jar

rem Oracle jar - contains JDBC drivers - everyone
set classpath=D:\9iAScore\1.0.2.2.2\jdbc\lib\classes12.zip;%classpath%

rem Java JCE Jar - everyone
set classpath=C:\j2sdk1.4.2_04\jre\lib\jce.jar;%classpath%
set classpath=C:\j2sdk1.4.2_04\jre\lib\ext\sunjce_provider.jar;%classpath%
set classpath=C:\j2sdk1.4.2_04\jre\lib\security\local_policy.jar;%classpath%
set
classpath=C:\j2sdk1.4.2_04\jre\lib\security\US_export_policy.jar;%classpath%

rem Java JSSE Jar - for Epos and iPayment customers
set classpath=d:\java\jsse1.0.2\lib\jcert.jar;%classpath%
set classpath=d:\java\jsse1.0.2\lib\jnet.jar;%classpath%
set classpath=d:\java\jsse1.0.2\lib\jsse.jar;%classpath%

java -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
com/sctcorp/ges/cc/SCTPaymentClient

Do you see anything that would indicate why the .txt file is only getting
one entruy??


--





Don
 
P

Pegasus \(MVP\)

There are some problems with your batch file.
1. The very first line is wrong. Instead of reading
@echo offrem SCT Payment Client Startup for Banner Webrem AUDIT TRAIL:
it should read:
@echo off
rem SCT Payment Client Startup for Banner Webrem AUDIT TRAIL:

2. The lines
set
classpath=C:\j2sdk1.4.2_04\jre\lib\security\US_export_policy.jar;%classpath%
make no sense. It should probably be one single line:
set
classpath=C:\j2sdk1.4.2_04\jre\lib\security\US_export_policy.jar;%classpath%

3. The lines
java -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
com/sctcorp/ges/cc/SCTPaymentClient
must be joined in your batch file. I cannot tell if they are because my
newsreader wraps them. Make sure that "com/" is on the same line
as "protocol".

To find out what trips up your batch file, modify it like so:
@echo off
rem SCT Payment Client Startup for Banner Webrem AUDIT TRAIL:
echo %date% %time% >>c:\payment_client_is_running.txt
goto :eof
{Leave the other lines here}

Run it, see if it works, then move the line "goto :eof" a few lines
further down. Eventually the batch file will fail and you will know
the culprit.
 
G

Guest

The batch file does work, when it was run seperately at 2 am,3 am,4 am,5 am,6
am, we could see 5 seperate tasks running (in the foreground). Now that we
changed the scheduler to start it at 2 am and to run it every hour for 5hr
59m, i only see one entry in the text file created by the echo command and
that's for 2:00 am. When I sent you a copy of the batch file i might have
screwed up the syntax, but the batch file does run. I will try test using
your latest suggestion and see what happens.
Thanks...
 
P

Pegasus \(MVP\)

Never ever retype the contents of a batch file for a post -
always use copy & paste. I do not wish to spend my
time sorting out typographical errors.
 
G

Guest

Isn't there some display within windows that will show you what jobs are
actually running. I put the echo command in the batch file and I can see by
looking at the .txt file that the jobs started at the appropriate time, but
other than seeing a number of cmd processes running in the task scheduler I
don't see anything that would tell me the name of the batch job's that are
running. I know they're running because I put through a credit card
transaction and it was accepted.
 
P

Pegasus \(MVP\)

The Task Scheduler GUI shows the status of each job when
in "Details" display: Running, "could not start", when it last ran,
when it will next run.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top