Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Batchjob Befehl time

Empfohlene Antworten

Veröffentlicht

Hallo zusammen,

folgendes (kleines?) Problem habe ich:

Ich verwende in einem Batchjob den Befehl time auf einer NT-Workstation.

Dessen Output wird dazu verwendet, eine Datei zu benennen. Nun ist das Problem das bei bei dem Befehl time eine Benutzereingabe erforderlich ist. Da der Job allerdings ohne Benutzereingabe laufen soll, die Frage, ob es möglich ist, diese Eingabe zu unterdrücken bzw im dem Batchjob selber abzufangen?

Leider ist ist time /t keine Alternative, da dessen Output auf einem englischsprachigen System nicht den Anforderungen genügt.

Originally posted by Fornax

Ich verwende in einem Batchjob den Befehl time auf einer NT-Workstation.

Falls time auf einer NT-Workstation genau so funktioniert wie in einem DOS-Fenster unter Win 9x, erwartet es eine neue Uhrzeit oder ein [Return] als Bestätigung der alten Uhrzeit. Dieses [Return] kannst du simulieren, indem du es in eine Datei schreibst, also z.B. mit

copy con Return.txt

[Return]

^Z

Jetzt kannst du aufrufen per

time < Return.txt

hth

Reinhold

Oder hiermit:

::JustTime.bat Vor Zeiten mal im Netz gefunden und auf deutsche Verhältnisse adaptiert

@echo off

:: "JustTime.bat" puts the current time into the environment

:: Written under MSDOS 7 (Win95), should work on all recent versions.

:: The trick here is to use the first word of a command output

:: as the name of a batch file.

:: First find the line starting with "Current" that ends with the time

:: A single CR/LF is sent to TIME with ECHO. to end the TIME command

echo.|time|find /i "aktuelle" >ak##elle.bat

:: We now have "Current time is 1:45:59.82p" (without quotes) in CU##ENT.BAT

:: Since the first word is CURRENT, we need a command with that name ready

:: Now create a batch file named CURRENT.BAT

:: CURRENT.BAT will set the TIME variable to it's third argument (the time)

echo set time=%%2>aktuelle.bat

:: We now have "set time=%3" (without the quotes) in CURRENT.BAT

:: Now CALL our CU##ENT.BAT, which will in turn run CURRENT.BAT

call ak##elle.bat

:: Display the time we worked so hard to get

::echo %TIME%

:: Now delete both temporary batch files and erase the TIME variable

del ak??elle.bat > nul

::set time=

:: http://www.ericphelps.com

::JustDate auf deutsche Verhältnisse adaptiert

@echo off

:: "JustTime.bat" puts the current time into the environment

:: Written under MSDOS 7 (Win95), should work on all recent versions.

:: The trick here is to use the first word of a command output

:: as the name of a batch file.

:: First find the line starting with "Current" that ends with the time

:: A single CR/LF is sent to TIME with ECHO. to end the TIME command

echo.|date|find /i "aktuelles" >ak##elles.bat

:: We now have "Current time is 1:45:59.82p" (without quotes) in CU##ENT.BAT

:: Since the first word is CURRENT, we need a command with that name ready

:: Now create a batch file named CURRENT.BAT

:: AKTUELLE.BAT will set the TIME variable to it's third argument (the time)

echo set date=%%3>aktuelles.bat

:: We now have "set time=%3" (without the quotes) in CURRENT.BAT

:: Now CALL our CU##ENT.BAT, which will in turn run CURRENT.BAT

call ak##elles.bat

:: Display the time we worked so hard to get

::echo %DATE%

:: Now delete both temporary batch files and erase the TIME variable

del ak??elles.bat > nul

::set time=

:: http://www.ericphelps.com

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.