Jump to content

Search the Community

Showing results for tags 'schedule'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 4 results

  1. CronToTime.au3 UDF converts a Unix Cron expression into a DateTime string. On Unix systems a Cron expression made of five fields separated by blanks/tabs followed by a shell command to execute. e.g. 15-30 2,3,4,5 29 1-12 0-6 reboot +------------- minute (0 - 59) ¦ +------------- hour (0 - 23) ¦ ¦ +------------- day of month (1 - 31) ¦ ¦ ¦ +------------- month (1 - 12) ¦ ¦ ¦ ¦ +------------- day of week (0 - 6) (Sunday to Saturday, 7 is also Sunday) ¦ ¦ ¦ ¦ ¦ +------------- some shell command ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ * * * * * reboot (In this UDF the 6th field has no meaning and no influence on the result). For more information see https://en.wikipedia.org/wiki/Cron Finds the next event of the specified Cron expression, starting from current UTC/GMT. _pce_findNextTimeUTC($sCronExp [, $bForwardSearch = True [, $minutesOffset = 0]]]) Finds the next event of the specified Cron expression. If $sDateTime is not set, local time will be used. _pce_findNextTime($sCronExp [, $bForwardSearch = True [, $sDateTime = "" [, $minutesOffset = 0]]]) Convert names in usable Cron expression values. e.g. "15-30 2,3,4,5 29 July-December Mo-Su" to "15-30 2,3,4,5 29 7-12 1-7" _pce_convertNames( $sCronExp ) See the include for details. New version on GitHub: https://github.com/seizu/CronToTime
  2. Howdy All I've gone around and around in circles wasting hours trying to fix this problem to no avail so I thought I would try posting for help given there are some real smart people in this forum. Background I have 5 separate .au3 scripts that all do different basic tasks. For example: 1.au3 = opens Chrome browser to obtain information from a specific website then closes 2.au3 = opens an Excel workbook to run a macro then saves and closes 3.au3 = Open two seperate workbooks and transfers data from one to the other then saves and closes 4.au3 = .......etc 5.au3 = .......etc These 5 separate scripts, doing completely different tasks, need to each run once per day at 5 different designated times within a day and then close. For example: 1.au3 = 10am 2.au3 = 12pm 3.au3 = 2pm 4.au3 = 4pm 5.au3 = 5pm Problem I can not get these different scripts to reliably run at their designated times. When I manually run these scripts individually by using 'Go F5' they work perfectly. If I convert these scripts to an .exe and manually run each one they work about 98% of time. How can I schedule these different .au3 files or associated .exe files to reliably run each day at different times? Attempts To Fix The Issue 1. I have tried converting each .au3 script into their own .exe file and use Window's Task Scheduler to run these .exe files at their designated time but the success rate of running each .exe in full, to completion, without error is very low at about 30%. Things that commonly go wrong include a browser not opening but movement still continues on the desk top. Other times things just do not happen at all. 2. I have Windows 7 64 bit and have tried creating and running both (x86) and (x64) .exe files but again reliability problems exist; 3. I have also tried moving each .exe file to the My Documents folder as I read someone that keeping your files on your desktop ties your files to individual Windows user profiles which can cause AutoIt operating errors. Not sure if this is correct but thought I would try it anyway. It did not fix my issue. 4. I installed a program called AlwaysUp which supposedly always reliably runs in the background and will reliably execute your AutoIt script or .exe files. Still have significant reliability issues. Therefore, can someone please provide advice on how I can get my 5 different .au3 files to run at 5 designated times through the day, every day, without fail? Overtime I will be creating more and more different .au3 files to run certain tasks throughout the day and do not want to create one large AutoIt file that continually runs and attempts to do all the different tasks itself. Any help is very appreciated. Thanks Dan
  3. #include <Excel.au3> #include <Array.au3> #include <String.au3> #include <IE.au3> local $oIE =_IECreate ("https://example.com/export") sleep(5000) WinWait("Internet Explorer") WinActivate("Internet Explorer") send("{TAB 2}") sleep(1000) send("{ENTER}") sleep(1000) WinWait("Save As") WinActivate("Save As") send("PatientsData.csv") sleep(1000) send("{TAB 3}") sleep(1000) send("{ENTER}") sleep(1000) WinWait("Confirm Save As") WinActivate("Confirm Save As") send("{TAB 1}") sleep(1000) send("{ENTER}") WinWait("Blank Page - Internet Explorer") WinActivate("Blank Page - Internet Explorer") sleep(1000) RunWait('taskkill /F /IM "iexplore.exe"') Exit I have written the above simple script, which open a link and save it to the disk. I execute it and every thing works fine. I scheduled it in windows task and it executed fine. However when I scheduled it and I logged out of the system it stops working. The scheduled start the task.exe. Open the internet explorer send f2 to open the save as dialogue and after that it fails to send the tab. Since partial script is execute therefore I think that the problem is not related to permissions. The script stops at second or third line.
  4. I am trying to write a script that will eventually go into a GUI but for now I'm just trying to get the script to run. I am trying to see "Who's Working" according to the times. I am having trouble with the overlap. If the end of someone's shift is 3pm but you're coming in at 1pm I can't view the two people only one. Also Trying to figure out how correlate people with dates (haven't been able to figure out how to put that in for the whole month) and when I'm calling the times can I do 17:30? I have issues with that as well. Any help would be greatly appreciated! Attached is the txt file that should be on the Desktop and the au3 code. but I'll paste the code in here as well. ; Determine workgroup and shift (These are hardcoded here but can be determined any way you want) Local $workgroupName = _WorkGroup() Local $shift = _Time() ; Build header to search the text file for Local $contactHeader = $workgroupName & $shift ; Declare variable to hold the body of the contact info to display Local $contactBody = "" ; Create file handle Local $file = FileOpen(@DesktopDir & "\ContactInfo.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 ; Read line Local $line = FileReadLine($file) ;Handle Error If @error = -1 Then ExitLoop ; search for workgroup header if $line = $contactHeader then ; Read next line $line = FileReadLine($file) ; Build contact info body until terminator is reached Do ; Add current line to contact body plus a carriage return ASCII code ; so that a new line begins next time through the loop $contactBody = $contactBody & $line & chr(13) ; Read next line $line = FileReadLine($file) Until $line = ";" ; Exit while loop to read file ExitLoop EndIf WEnd ; Close file FileClose($file) ; Populate label for message box Local $contactString = "Workgroup: " & _WorkGroup() & chr(13) $contactString = $contactString & "Shift: " & _Time() & chr(13) & chr(13) $contactString = $contactString & $contactBody ; Display message box MsgBox(4096, "Contact Info", $contactString) Func _Time() Local $AMPM, $hour If @HOUR <= 05 Then $hour = ("Night") ElseIf @hour >= 18 Then $hour = ("Night") ElseIf $hour = ("Day") EndIf Return $hour EndFunc ;==>_Time Func _WorkGroup() Local $AMPM, $hour If @HOUR >= 02 And @HOUR <=11 Then $hour = ("Workgroup2") ElseIf @HOUR >= 10 And @HOUR <= 19 Then $hour = ("Workgroup3") ElseIf @HOUR >= 23 And @HOUR <= 08 Then $hour = ("Workgroup1") EndIf Return $hour EndFunc ;==>_Time ContactInfo.au3 ContactInfo.txt
×
×
  • Create New...