Wanted: Open file at date and time

Discussion in 'App Development' started by easymon1, Jun 15, 2022.

  1. easymon1


    Know a simple easy method to enter a date and time at which a text file will be opened?
    Input: 2022 0617 0915
    Action: at that time this file is opened to the desktop, e.g. 'NewsAnnouncement.txt'

    Using windows taskscheduler for setting that up for each and every announcement, some of which do not repeat as reliably as jobless claims, is a pain.
    Dos command line is fine. Anything fancier without sacrificing simplicity is icing on the cake.

    Later that same day after the text was opened and dismissed, to open the same file this would be the input: 2022 0617 1300 .
    Last edited: Jun 15, 2022
  2. DaveV


    DOS AT command:

    The AT command has been deprecated. Please use schtasks.exe instead.

    The AT command schedules commands and programs to run on a computer at
    a specified time and date. The Schedule service must be running to use
    the AT command.

    AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
    AT [\\computername] time [/INTERACTIVE]
    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

    \\computername Specifies a remote computer. Commands are scheduled on the
    local computer if this parameter is omitted.
    id Is an identification number assigned to a scheduled
    /delete Cancels a scheduled command. If id is omitted, all the
    scheduled commands on the computer are canceled.
    /yes Used with cancel all jobs command when no further
    confirmation is desired.
    time Specifies the time when command is to run.
    /interactive Allows the job to interact with the desktop of the user
    who is logged on at the time the job runs.
    /every:date[,...] Runs the command on each specified day(s) of the week or
    month. If date is omitted, the current day of the month
    is assumed.
    /next:date[,...] Runs the specified command on the next occurrence of the
    day (for example, next Thursday). If date is omitted, the
    current day of the month is assumed.
    "command" Is the Windows NT command, or batch program to be run.
  3. Use scripting lang like AutoHotKey. What you need is done in 3-5 lines of simple code in AHK.
  4. Overnight


    Jiminy Christmas. You have been reduced to running DOS commands on the command prompt in Windows to schedule a simple pop-up? Oh my how far we have fallen.

    Dare I say we have fallen into NI territory now.

  5. easymon1


    So far so good, lol.
    batch file 'News Announcement.bat' contains this...
    start "" "C:\News Announcement.txt"

    and opens a text file that contiains something like this...
    Thu Jun 16
    Philly Fed Manufacturing Index
    Unemployment Claims
    Building Permits
    Housing Starts

    8:30 AM ET
    USA US:Housing Starts and Permits
    USA US:Jobless Claims
    USA US:philadelphia Fed Manufacturing Index

    Now, what's wanted is to
    - run that batch file at specific time.

    "The AT command has been deprecated. Please use schtasks.exe instead."
    Anybody know how this goes?

    Is it possible to make schtasks run at specific time

    Is it possible to make batch file run at specific time

    ... or whatever tool gets the job done.
    simple is beautiful ...
    simple is beautiful.jpg
    Last edited: Jun 17, 2022
  6. easymon1


    That's the idea. Do you have a solution that is less kludgey than windows task scheduler GUI?
    Last edited: Jun 18, 2022
  7. tiddlywinks


  8. easymon1


    Thank you for the link. I always wonder what might be tagging along for the download ride into my computer with such products, otherwise that would be something to consider. Overnight will pull through with something.
  9. Overnight


    Sorry man, I got nothing for you as I do not ever run scheduled tasks. But I wold put aside your paranoia about downloading third-party progs, and possibly "catching" something.

    I've reviewed the link tiddlywink provided, and I see no reason to suspect they are a bad actor. You can tell by the support forum.


    They have a free version for eval. It will not hurt you to try them. Make sure your malware and anti-virals are up to date if you are nervous, and you should be fine.
  10. Overnight


    Easymon, the best task scheduler is in your head. Why do you need to program all this crazy stuff to...Don't even know what you are doing...Pop-up a website to show you a new release or something? What is your actual goal?
    #10     Jun 18, 2022