topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • July 17, 2018, 01:06 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sprint907 [ switch to compact view ]

Pages: [1]
1
Is there a command line version of this program?

2
hi 4wd,
This is what I wanted.
Thanks a lot.  Much appreciated.

3
This is my requirement...
I am running many instances of xxcopy.exe in multiple command line windows.
I need to shutdown the PC after all the xxcopy.exe process completes.
I need a program which waits till all xxcopy.exe instances are completed

example :- i could write a batch file which has below contents
----------------------------
myprog.exe xxcopy.exe
shutdown -s
----------------------------
The program should wait and then execute the shutdown.


or if i have xxcopy.exe, java.exe, oracle.exe processing running, and I need to send an email after all three have completed...
----------------------------
myprog.exe xxcopy.exe java.exe oracle.exe
sendmail -to abc@yahoo.com -subject "complete"
----------------------------

Is such a program possible?

4
Finished Programs / Re: DONE: Run At Specified Time
« on: November 26, 2012, 12:08 AM »
Attaching the binary and source code in a zip file.

Thanks Ath and rjbull for their help.

5
Finished Programs / Re: DONE: Run At Specified Time
« on: November 21, 2012, 04:35 AM »
Yes Ath, and thank you for that.
I was trying to replicate the functions of your utility... but it was too much work :(
so, I settled with a "one function only" utility :)

6
Finished Programs / Re: DONE: Run At Specified Time
« on: November 21, 2012, 01:53 AM »
I have written a C program which will do only what I had described as a requirement, ie.. wait till next day...
The source code is below...
/********************************************************************************/
/*
This program compiles fine on Microsoft Visual C++ 6.0.
Generated exe is 96kb in size.  How to reduce the size?
*/
#include "stdafx.h"
#include "stdlib.h"
#include "time.h"

int main(int argc, char* argv[])
{
    if(argc > 1) {
        printf("This program sleeps till the end of current day. ie.. exits when a new day starts.\n");
        return 0;
    }
    bool nextDay = false;
    char* inputDate = "";
    char* inputTime = "";
    struct tm *newtime;
    time_t long_time;

    time( &long_time );                /* Get time as long integer. */
    newtime = localtime( &long_time ); /* Convert to local time. */
    int currentDate = newtime->tm_mday;


    for( ;; ) { /* loop as along as required */
        _sleep(1000);
        time( &long_time );                /* Get time as long integer. */
        newtime = localtime( &long_time ); /* Convert to local time. */
        //printf( "%.19s %s\n", asctime( newtime ), am_pm );
        int newDate = newtime->tm_mday;
        if(currentDate != newDate ) { /* exit out of loop when date changes . ie.. next day */
            break;
        }
    }
    return 0;
}

/********************************************************************************/


Hope this helps someone.
Will attach binary tomorrow.

7
Finished Programs / Re: DONE: Run At Specified Time
« on: November 14, 2012, 03:10 AM »
Ath,
Is there a way to specify that I need to wait till the next day?  I do not want to update the script everytime to give the next day's date in the command.

for example:-
instead of
SleepTill.exe 2012-11-15
or
SleepTill.exe 2012-11-16

I should be able to give
SleepTill.exe NEXTDAY
or something similar.

regards

8
Finished Programs / Re: DONE: Run At Specified Time
« on: November 05, 2012, 04:52 AM »
hi Ath,
Thanks a lot. That is exactly what I was looking for.
Anyways, I scraped vbscript code from the internet and wrote one myself .
Am posting the code here .. may be it will help someone else


'================================================================================
'start of script
'
'Usage: wait.vbs 16:30
'Sleep till 4.30PM and then exits

Option Explicit

Dim WshShell
Dim strEventInfo
Dim intSeconds, intMicrotime

Set WshShell = CreateObject("WScript.Shell")

'================================================================================

dim inHour
dim inMinute
dim segments
segments = Split(WScript.Arguments.Item(0),":")
inHour = segments(0)
inMinute = segments(1)
inHour   = CInt(inHour)
inMinute = CInt(inMinute)
'Wscript.Echo "Hour   = " & inHour
'Wscript.Echo "Minute = " & inMinute

'================================================================================
while( (currHour <= inHour) and (currMinute < inMinute))

    dim now1
    now1=now()
    'Wscript.echo now1
    segments = Split(now1," ")
    dim timeComponent
    timeComponent = segments(1)
    'Wscript.echo "timeComponent = "+timeComponent
    dim currHour, currMinute, currSeconds
    segments = Split(timeComponent,":")
    currHour    = segments(0)
    currMinute  = segments(1)
    currSeconds = segments(2)
    'Wscript.echo "currHour    = "+currHour
    'Wscript.echo "currMinute  = "+currMinute
    'Wscript.echo "currSeconds = "+currSeconds
    currHour    = CInt(currHour)
    currMinute  = CInt(currMinute)
    currSeconds = CInt(currSeconds)

    'Wscript.echo currHour & ":" & currMinute
    WScript.Sleep 1000
wend
'================================================================================
'end of script

9
Finished Programs / Re: DONE: Run At Specified Time
« on: November 02, 2012, 08:00 AM »
What I had in mind was similar to sleep.exe, which will block the execution till the time is complete.
The "opening hours" program is like a scheduler.  It cannot be used inside a batch file :(

10
Finished Programs / Re: DONE: Run At Specified Time
« on: November 02, 2012, 06:25 AM »
Thanks a lot for the immediate response.
I will look at that program and see if it meets my need.

11
Finished Programs / DONE: Run At Specified Time
« on: November 02, 2012, 05:15 AM »
We all know the sleep utility.  It takes as parameter the number of seconds to sleep before it exits.
I am looking for a command line utility which will SLEEP TILL A SPECIFIED TIME

example:-

sleeptill.exe 03:30

This program sleeps until the computer time is 03:30AM, and then exits.
It can be enhanced with date parameters also.
example :- sleeptill.exe 2012-11-02:03:30

This program can be used as a alternative to the windows task scheduler.  And can be used in batch files and so on...

Pages: [1]