ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Windows Task Scheduler not running my task. Cron for Windows?

    IT Discussion
    4
    9
    385
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JasGot
      last edited by

      I read Z-Cron was an option. Anyone use it or have a another preference?

      1 Reply Last reply Reply Quote 1
      • scottalanmillerS
        scottalanmiller
        last edited by

        Never seen it. I like Cron as a mechanism on UNIX, it's always been solid. But I can't say that I've ever had Task Scheduler not work. Seems like attacking issues on TS would make more sense, but getting cron would be nice.

        1 Reply Last reply Reply Quote 0
        • 1
          1337
          last edited by 1337

          @JasGot said "Windows Task Scheduler not running my task"

          Why isn't the task scheduler running your task?

          J 1 Reply Last reply Reply Quote 0
          • J
            JasGot @1337
            last edited by

            @Pete-S said in Windows Task Scheduler not running my task. Cron for Windows?:

            Why isn't the task scheduler running your task?

            Don't know. 😞 Just can get it to run.

            I trying to run a .cmd script

            Everything is set right. I use task scheduler everyday on client servers. Can't get this one to run.

            This is my cmd script.

            c:
            cd \rclone
            rclone sync "E:\Shares\Photos and Graphics\Sync2Cloud" remote:bucket
            echo Completed at %time% %date%>>log.txt
            

            Going to reboot to see if it helps.

            DustinB3403D 1 Reply Last reply Reply Quote 0
            • J
              JasGot
              last edited by

              Out put of: schtasks /query /v /fo LIST /s SERVER

              HostName:                             server
              TaskName:                             \RClone to Bucket
              Next Run Time:                        12/11/2020 9:10:00 PM
              Status:                               Ready
              Logon Mode:                           Interactive/Background
              Last Run Time:                        12/11/2020 9:06:19 PM
              Last Result:                          0
              Author:                               domain\administrator
              Task To Run:                          cmd /c sync2cloud.cmd
              Start In:                             c:\rclone
              Comment:                              N/A
              Scheduled Task State:                 Enabled
              Idle Time:                            Disabled
              Power Management:                     Stop On Battery Mode
              Run As User:                          domain\administrator
              Delete Task If Not Rescheduled:       Disabled
              Stop Task If Runs X Hours and X Mins: 72:00:00
              Schedule:                             Scheduling data is not available in this format.
              Schedule Type:                        Daily 
              Start Time:                           7:00:00 PM
              Start Date:                           12/11/2020
              End Date:                             N/A
              Days:                                 Every 1 day(s)
              Months:                               N/A
              Repeat: Every:                        0 Hour(s), 5 Minute(s)
              Repeat: Until: Time:                  None
              Repeat: Until: Duration:              Disabled
              Repeat: Stop If Still Running:        Disabled
              
              1 Reply Last reply Reply Quote 0
              • J
                JasGot
                last edited by

                Changed the trigger it is working now. Never seen this before. Changed from time based trigger to "System Startup"

                HostName:                             SERVER
                TaskName:                             \RClone to Bucket
                Next Run Time:                        N/A
                Status:                               Ready
                Logon Mode:                           Interactive/Background
                Last Run Time:                        12/11/2020 9:54:48 PM
                Last Result:                          0
                Author:                               domin\administrator
                Task To Run:                          cmd /c c:\rclone\sync2cloud.cmd
                Start In:                             c:\rclone
                Comment:                              N/A
                Scheduled Task State:                 Enabled
                Idle Time:                            Disabled
                Power Management:                     Stop On Battery Mode
                Run As User:                          domain\administrator
                Delete Task If Not Rescheduled:       Disabled
                Stop Task If Runs X Hours and X Mins: 72:00:00
                Schedule:                             Scheduling data is not available in this format.
                Schedule Type:                        At system start up
                Start Time:                           N/A
                Start Date:                           N/A
                End Date:                             N/A
                Days:                                 N/A
                Months:                               N/A
                Repeat: Every:                        N/A
                Repeat: Until: Time:                  N/A
                Repeat: Until: Duration:              N/A
                Repeat: Stop If Still Running:        N/A
                
                1 Reply Last reply Reply Quote 0
                • 1
                  1337
                  last edited by 1337

                  Your settings confuse me a little.
                  When you have "interactive" don't you have to be logged in for the task to run?

                  When I've had problems with tasks not running it's always been something with the environment the task runs in. Like being the wrong user, not having a search path to the commands I'm trying to execute, not having the right environment variables etc. Especially so when you run the task under another user compared to what you are logged in as.

                  From what I remember I usually set up tasks to run as the local SYSTEM account. And if I need networks drives, for instance copying files to another server, I map them with net use and then destroy them in the script. That is not applicable in your case but it's just one example of preparing the environment the task has to execute in.

                  J 1 Reply Last reply Reply Quote 0
                  • DustinB3403D
                    DustinB3403 @JasGot
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • J
                      JasGot @1337
                      last edited by

                      @Pete-S said in Windows Task Scheduler not running my task. Cron for Windows?:

                      When you have "interactive" don't you have to be logged in for the task to run?

                      No, the only two options for Mode are "Interactive Only" and "Interactive/Background" the slash mean Or in this case.

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        Last post