Task Scheduler Program

I live in a rural area and have Satellite internet. That means Data caps. But, I have 5 hours of unlimited each night. 12:00am-5:00. Is there a software program or way to schedule my downloads from iTunes? I can usually manage my software updates, but really want to buy/rent moves and TV shows. I just need to be able to download them at a later time.
Macbook
OSX 10.7.5
Thanks

Well, first of all I wouldn't trust any code from roseindia. So you might want to look for more reliable advice.
As for your logging, you can add it for example to the TimerTask itself. I don't recommend adding logging to that roseindia cr*p though.

Similar Messages

  • Handling exception logging in a Java task scheduler program?

    I need to design a Task Scheduler Where
    1) User should be able to schedule multiple task at the same time.
    2) There should be proper error handling on failure of any task and should not affect the other running tasks.
    I found the related programme at http://www.roseindia.net/java/example/java/util/CertainAndRepeatTime.shtml
    My concern is about handling of point 2 in program provided at above link. Say I schedule a recurring mail send process in above program which will be run first time on 12 september 2011 at 2 am, and will be repeated after every 2 hours Say a one process fais at 8 am. I want to log it in log file with task name and time details. Now if I look at above programme i.e CertainAndRepeatTime.java. This program will exit once it schedules all the tasks. Where and how should handle the logging?
    Posted at http://stackoverflow.com/questions/7377204/handling-exception-logging-in-a-java-task-scheduler-program but folks suggesting Quartz scheduler . My Limitation is that i can't for quartz because my project allows me to use only standard java library. Is there any way we can handle logging in the same programme in case of exception.

    Well, first of all I wouldn't trust any code from roseindia. So you might want to look for more reliable advice.
    As for your logging, you can add it for example to the TimerTask itself. I don't recommend adding logging to that roseindia cr*p though.

  • What is the best way to run a powershell script with parameters in the Task Scheduler?

    Hello, 
    Want to run the following from a scheduled task in the Task Scheduler on a server.  What is the best approach?
    .\pscript.ps1 -csvfile "\\Srv1\Share\File.txt"
    Thanks for your help! SdeDot

    Hi,
    To run a powershell script with parameters in the Task Scheduler:
    Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add argument (optional): -Command "& c:\scripts\test.ps1 -par1 2 -par2 3"
    Hope the below two articles be helpful for you:
    Schedule PowerShell Scripts that Require Input Values
    https://blogs.technet.com/b/heyscriptingguy/archive/2011/01/12/schedule-powershell-scripts-that-require-input-values.aspx
    How to Schedule a PowerShell Script
    http://dmitrysotnikov.wordpress.com/2011/02/03/how-to-schedule-a-powershell-script/
    Regards,
    Yan Li
    Regards, Yan Li

  • Powershell script not running in the task scheduler...

    I've created a .ps1 script to transfer a file using WinSCP can run it in the ISE environment, in the PS window, and with the run command. I've transferred the command I used in the run prompt to the task scheduler but it is not running. It is running everywhere
    else just not in the scheduler. It says that it completes okay and gives a return code of OpCode=2
    The action is set to run this: c:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe
    The Arguments: -ExecutionPolicy Bypass -file "C:\Users\me\scriptsWCP\FileTransferPS.ps1"
    Also have it running with the highest permission and as SYSTEM

    Hi,
    To run a powershell script with parameters in the Task Scheduler:
    Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add argument (optional): -Command "& c:\scripts\test.ps1 -par1 2 -par2 3"
    Hope the below two articles be helpful for you:
    Schedule PowerShell Scripts that Require Input Values
    https://blogs.technet.com/b/heyscriptingguy/archive/2011/01/12/schedule-powershell-scripts-that-require-input-values.aspx
    How to Schedule a PowerShell Script
    http://dmitrysotnikov.wordpress.com/2011/02/03/how-to-schedule-a-powershell-script/
    Regards,
    Yan Li
    Regards, Yan Li

  • Windows task scheduler to run batch file running a java program

    I have created a batch file that runs my SendEmail program. The batch file is in the same directory as the java program. The only line in the batch file is
    java SendEmail
    This works fine from the command prompt but from the windows task scheduler it fails to function. Any help on how I can overcome this problem will be greatly appreciated.
    THanks

    Looks okay. The classpath is set, too, I guess? Btw, try running javaw instead of java. I may err, but I think it can show a console, so you can watch any error messages.

  • When trying to run a Visual Studio 2010 program under Task Scheduler, it always gives a return code of 3762507597.

    I am trying to run a Visual Studio 2010 program under Task Scheduler. We were running the program under Scheduled Tasks
    in Windows XP with no problems. When it runs under Task Scheduler it always gives a return code of 3762507597. If I run
    the program out of Task Scheduler it runs fine. Running Task Scheduler as Administrator and running the program with
    Run with highest privileges.. Any help or suggestions would be appreciated....  Thanks

    Hi,
    Could you let us know the exact error message? How did you configure it?
    Please follow this guide to check your settings:
    Use the Task Scheduler to Launch Programs Without UAC Prompts
    http://www.7tutorials.com/use-task-scheduler-launch-programs-without-uac-prompts
    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Karen Hu
    TechNet Community Support

  • Use a "Write" Event on a Specific Drive or to a Specific Folder to Trigger a Task in Task Scheduler

    I first posted this question on the Microsoft Community forum. It was suggested that I repost it here.
    I have a question!
    (Pleas forgive the long post...)
    What I am trying to do: (This is what I have not yet figured out!)
    I am trying to figure out how to trigger a task, in Windows Task Scheduler (WTS), whenever a "Disk Write" event occurs on a specified drive on the machine. - Or, more specifically, whenever a new file or folder is written or
    saved to a specified Folder, or a specific Disk Partition, or a specific Hard Disk on the machine - whichever is more relevant for the end goal.
    The overall goal:
    When a "disk write" operation occurs and data is written to a specified location on a Hard Drive, start a Program at the beginning of the following hour, that will run a backup of the contents
    of that location, (after - of course - the new data has been written). After the backup is complete, disallow the program from being started again at the beginning of the next hour, unless more data is written to the specified location beforehand.
    Example:
    At 2:27pm, I save a new word document to "D:\My Folder\". When the new Word doc file is saved to "D:\My Folder\", my preferred Backup software application is then scheduled to run a backup at the beginning of
    the following hour - at 3:00pm - which will then create a new backup of "D:\My Folder\".
    The backup software will NOT be scheduled to run again at the next following hour - at 4:00pm - unless another file or additional data is written to "D:\My Folder\" - between 3:00pm and 4:00pm.
    Summary:
    The goal here is to only run a backup at the beginning of the next hour, following a “disk write” event to a specified location on the hard drive.
    Steps that I have, so far, on how to make this happen:
    Whenever data is written to a specified location on a hard drive (i.e. "D:\My Folder\"), "Task A," in Windows Task Scheduler, will be triggered to execute its action.
    The Action in "Task A" will run a script that changes the Status of "Task B" to ENABLED.
    The Action in "Task B" will, on a continuous hourly schedule, start a program that will perform work on the machine. (In this case, it will run a Backup Task in my preferred backup software.)
    Upon completion of work by that program (the Backup software), that program will run another script that will change the Status of "Task B" back to DISABLED; preventing "Task B" from continuing that program every hour
    according to its hourly schedule.
    How do I do this: ... ?
    The thing holding me back on making this work is figuring out how to identify the source that generates the “disk write” event and event ID I need, so I can use it to trigger a task in Windows Task Scheduler - in the way that I need. Furthermore,
    the “disk write” event needs to specific to a disk drive that I specify and if at all possible, specific to a location that I specify, i.e. “D:\My Folder\”.
    Any help on this as well as other suggestions on making this work is greatly appreciated!
    Ryan A Miller

    Hello Ryan A Miller,
    What is your current situation?
    Have you try the script as  Frederik Long mentioned?
    To receive better support, it is recommended to post in the TechNet Script forum.
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    The professionals there will be glad to help you.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • SyncToy 2.1 Can't Find NAS Folder When Run From Task Scheduler

    I'm using SyncToy 2.1 to keep two WIN7 computers and a Synology DS414j NAS drive in sync. I have several folder pairs configured, some between the two PC's and three between one PC and the NAS drive. I have a task set up for automatic syncing. The problem
    is SyncToy can't find the destination folders on the NAS drive if it's run from Task Scheduler. If I run SyncToy manually, everything works fine. I've even tried opening the command prompt and running the exact same program Task Scheduler is running (SyncToyCmd.exe
    -R), and it works perfectly. But when Task Scheduler runs the task, it fails to find the NAS folders with the following error message:
    SYNC: 08/21/2014 14:12:26:140: *** Failed to execute folder pair Downloads to NAS. Could not locate folder \\DISKSTATION\Downloads\.
    I've been looking for days for a solution and have not found anyone with this problem. Any ideas?

    Hi Texxxas,
    Apparently the problem is not with SyncToy, it is with Task Scheduler. If you have had Task Scheduler work for you in the past, then I don't have an answer for that. I have never been able to get Task Scheduler to work correctly with SyncToy and a NAS drive.
    I have found that for some reason it works with USB external HDD's but will not work with a network connected hard drive. The same bug exists in Win8.1 as well. However, I have since found a third party task scheduler that works perfectly with SyncToy and
    my NAS drive. It is called System Scheduler by Splinterware. The free version only works when you are logged in but they have a paid version that runs as a service and will execute without being logged in. This has solved my problem.

  • Running a .cmd file at startup using Task Scheduler on Windows 2012 R2 server

    Hello,
    I've recently tried to get a simple .cmd file running at server startup on my Windows 2012 R2 server.
    The .cmd (test.cmd) file contains the following:
    C:
    cd C:\SomeFolder\
    call Some.exe file "Argument1" "Argument2"
    I've ensured that the local administrator user [someuser01] has full control of the C:\SomeFolder
    I've also ensured that someuser01 is part of Log on as Batch Job
    in Local Security Policy
    To try running it as startup, I tried using Task Scheduler.
    General Tab: I set the user (local administrator account [someuser01] ) and ticked the options
    Run whether logged on or not, Do not Store Password, Run with Highest Privileges
    Triggers: At System Startup, Ticked Enabled
    Actions: Start a Program. Program/Script: test.cmd, Add arguments: [Blank], Start in: C:\SomeFolder
    Conditions: Unticked all conditions
    Settings: Ticked only the following --> Allow task to be run on demand, If the running task does not end...force to stop
    Then I clicked OK and was prompted for someuser01's credentials.
    I then restarted the server.
    Upon logging in as administrator, I checked the task scheduler, and I found that the task did not run (Last Run Time: Never)
    I've been able to run it manually (click Run on the task in Task scheduler) without any problems.
    I just cannot get it to run at startup as I've instructed Task Scheduler to do.
    Any ideas on what might be causing this problem?
    Thanks.

    Hello Dave Patrick,
    I've also tried this approach and I came across this error after I try to enter someuser01's credentials:
    An error has occured for the task sometask01. Error message: The following error was reported: A specified logon session does not exist. It may already have been terminated..
    After doing some research, this new error is caused by a setting in Local Security:
    Local Security Policy --> Security Options --> Network Access: Do not allow storage of passwords and credentials for network authentication --> Enabled
    Unfortunately, I cannot disable this Security Policy due to our company's internal restrictions.
    Just to clarify, the reason that the task does not run at startup is because of a logon failure because the password was not stored for
    someuser01 ?
    However, I cannot allow storage of the password because of our our company's internal restrictions.
    Is there a possible workaround for this..?
    Thanks!

  • Exchange 2013 mailbox auditing command with showdetails parameter in ps1 script is not working via task scheduler

     
    Hi All ,
    In my environment we are having exchange 2013 enterprise edition with SP1 which is installed in windows server 2012 standard edition.
    We have enabled mailbox auditing for few mailboxes and also we have made simple powershell script with only the below mentioned commands .when i run the  ps1 script  in exchange management shell ,i can able to get the relevant output.
    CMDLETS in powershell script :
    Search-MailboxAuditLog -StartDate ((Get-Date).AddHours(-24)) -EndDate (Get-Date) -showdetails | fl >e:\output.txt
    Note : we are having only the above commands in ps1 script , apart from that we don't have anything in it .
    Sametime i have scheduled the same powershell script via task scheduler .But i cannot able to get the valid output ,instead of that i was getting a blank output file with no data in it . 
    Steps handled on my side to run the powershell script in task scheduler: 
    1.when i remove the parameter showdetails in the ps1 script ,i can able to get the output in the txt file .But in my scenario showdetails is the only parameter which will brought me more and in depth details about mailbox auditing.
    The Difference what i have seen between exchange 2010 and exchange 2013 
    when in run the same powershell script via task scheduler in exchange 2010 enterprise environment installed in windows server 2008 r2 enterprise OS, i can able able to get the proper output without removing the showdetails parameter .
    I am using the below methods to run the ps1 file via task scheduler in exchange 2013 environment .
    program/script : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add arguments : -PSConsoleFile "E:\Program Files\Microsoft\Exchange Server\V15\Bin\exshell.psc1" -Command ". 'C:\scripts\MailboxAuditReport\test.ps1'"
    I have mentioned the error below and that is the one what i have faced, when i try to run the PS1 script directly in windows powershell and not in exchange management shell .
    Error message : "the requesting account does not have permission to access the audit log"
    Please help me out to resolve this case .
    Thanks 
    S.Nithyanandham

    Hi All ,
    In my environment we are having exchange 2013 enterprise edition with SP1 which is installed in windows server 2012 standard edition.
    We have enabled mailbox auditing for few mailboxes and also we have made simple powershell script with only the below mentioned commands .when i run the  ps1 script  in
    exchange management shell,i can able to get the relevant output.
    CMDLETS in powershell script :
    Search-MailboxAuditLog -StartDate ((Get-Date).AddHours(-24)) -EndDate (Get-Date) -showdetails | fl >e:\output.txt
    Note : we are having only the above commands in ps1
    script , apart from that we don't have anything in it .
    In case, if i have scheduled the same powershell script via task scheduler .But i cannot able to get the valid output ,instead of that i was getting a blank output file with no data in it . 
    Steps
    handled on my side to run the powershell script in task scheduler: 
    1.when i remove the parameter showdetails
    in the ps1 script ,i can able to get the output in the txt file .But in my scenario showdetails is the only parameter which will brought me more and in depth details about mailbox auditing.
    The
    Difference what i have seen between exchange 2010 and exchange 2013 
    when in run the same powershell script via task scheduler in exchange 2010 enterprise environment installed in windows server 2008 r2 enterprise OS, i can able able to get the proper output without removing the showdetails parameter .
    I
    am using the below methods to run the ps1 file via task scheduler in exchange 2013 environment .
    program/script : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add arguments : -PSConsoleFile "E:\Program
    Files\Microsoft\Exchange Server\V15\Bin\exshell.psc1" -Command ". 'C:\scripts\MailboxAuditReport\test.ps1'"
    I have mentioned the error below and that is the one what i have faced, when i try to run the PS1 script directly in windows powershell and not in exchange management shell .
    Error message : "the requesting account does
    not have permission to access the audit log"
    Please help me out to resolve this case .
    Thanks 
    S.Nithyanandham

  • Task Scheduler - Bad login when using the correct password

    Greetings,
    I have been working an issue with Task Scheduler for a while now. I have done the forum rumble as well and looked at most if not all the posts to no avail. So here is my setup is on Server 2008 R2 SP1:
    I have a service accounts, we are looking to automate a basic file compile of data then a file copy. Nothing fancy however it is nothing I can share. I have all unc paths in the file so there is no odd drive latter mapping going on. The BAT file executes
    without issue from a cmd prompt without issue nor error.
    When I put it into Task Scheduler however things do not go so well. I have checked permissions: the account is a local admin to the system, it has the right to logon as a batch and service as well as create global objects. The account
    has rights to the directories explicitly applied as well as in groups it is a part of. I can execute the task when running the console as the account, I can run the task when I relax a policy for Network access: store passwords, to allow the task
    to run when the users is logged in or out. However when I run the task and check don't store the password it fails with the error that it is a bad logon user name and password are incorrect.
    I swapped the target account to the local Admin GROUP and it works but this is not ideal for tracking and security reasons. I created a new group and gave it rights locally as above and add the account to it but that failed.
    At this point having hit just about everything I can find to include path for Start In option, Run as highest privilege, changing to UNC, and explicit permissions I am not finding a light at the end of this tunnel.
    I have a feeling there is something simple or maybe it is something I am not aware of. I had read a few places of a possible corrupt store for the password cache for Task Scheduler but I did not see that anything else on it beyond mention.
    Any help ANYONE can provide on this would be greatly appreciated.

    As you maybe looking for an update I did find a workaround but not a solution.
    I went in and disabled the local storage of password block in the local system registry. This allowed the task to store the password for the task and work. We next ran GPUPDATE to reset the change but, DID NOT change the task itself and it worked.
    So what does this mean?
    From my perspective, we are seeing an issue or bug where the hand off of the account information to the S4U/system is dropping the account credentials and not storing the information as needed/required to run the task with the Do Not Store setting in
    place. This narrows down things tremendously and I am going to proceed back to isolated testing on this issue. Meaning I am going to take the box back to square one and move it up progressively to see if I am missing a setting here or there to allow/disallow
    the use of Do not Store Password for scheduled tasks.
    I am not sure there is a MSMasters program for Task Scheduler but I think I should be able to apply for it now.
    As always if you have an idea for me to try PLEASE POST IT. I will give it a whirl and report back in.

  • Batch/Powershell file wont run via Task Scheduler

    Hello,
    I'm having trouble getting my Powershell file to run from Task Schedule during logoff. In short, I'm trying to upload my NTUSER.DAT (roaming profile) to my profiles folder on the file server. Dynamic VLAN switching does not support roaming profiles thus
    I have to use a script to solve this issue.
    My powershell script is as follows:
    start-sleep -s 15
    Set-Content -Path "C:\Temp\log.txt" -Value "Hello World"
    $FileServer = 10.10.5.5
    $FQDN = "$Env:UserDomain"
    $User = Get-WmiObject -Class Win32_NetworkLoginProfile | Sort-Object -Property LastLogon -Descending | Select-Object -Property * -First 1 | Where-Object {$_.LastLogon -match "(\d{14})"} | Foreach-Object { New-Object PSObject -Property @{ Name=$_.Name.TrimStart("$FQDN\") }} | Select -ExpandProperty Name
    copy-item -path C:\Users\$User\NTUSER.DAT -destination \\$FileServer\Profiles$\$user.V2\ -force
    copy-item -path C:\Users\$User\NTUSER.DAT -destination \\$FileServer\Profiles$\$user.V3\ -force
    I have a task schedule to run as Domain Admin when event ID 4647 occurs (logoff). It is set to run with the Highest Privileges checked, also I have enabled to run weather the user is logged in or no. The Domain Admin account also has access to ever file,
    both at source and destination. Set-ExecutionPolicy is set to unrestricted. The way I call the powershell script in Task Scheduler is:
    Action: Start a program
    Program/Script: C:\temp\launch.bat
    The launch.bat contains the following:
    Powershell.exe -executionpolicy unrestricted -File "CALL C:\temp\powershell.ps1"
    The task is triggered each time when the user logs off, I have confirmed this in the logs. But the NTUSER.DAT file fails to copy over to the network, in fact the log.txt file isn't even generated. I have confirmed my code to work, it's just the task scheduler
    part calling the code where I think it fails.
    Can you guys point me in the right direction here? I know I'm close, but not sure what I'm missing. 

    Jrv,
    Yes in my testing the task schedule is unreliable, I don't have any info on how long the profile is locked, thus I can't copy the profile to the server when the OS still has it locked.
    What do you propose I change my vlan configuration to?
    Thanks.
    What you are trying to do cannot be done.  That is why it is not being done.  If you set up roaming profiles and redirected folders this would happen automatically.  It would also happen very quickly.  THat is because Windows posts cahnges
    to teh roamed image as they happen.  Only changes are copied. Items in teh registry which are only valid during logon (Dynamic Entries) are nver copied so updates that are not needed are not posted.  It is these updates thaat can keep the registry
    locked for a very long time.
    If you scan your network you will likely find hives thaat are loaded with no one logged in.  WIndows 7 and later have a utility that forces and unload after a few minutes.  It posts the reson for the forced unload to the event log.
    As for the VLAN it is likely not configured correctly.  THe profile must be on a server that is available on the same net ID as the PC.  YOu may also have to allow the switch to suspend if you are using per-user conenctions.  Contact the VLAN
    vendor and tell them about issues with Roamed profiles.  THey will walk you through the setup.  THe most common issue is thaat the switch specifies 1Gb and the server is set to 100Mb and the switch is not set to match the speed.  THisis a simplpe
    configuration error done by a tech who does not have much experience with VLANs.  THey tend to think that setting everything to 1Gb or some other maximum will work but it won't.  It can also be caused by a files server with a 1Gb card that is a pront
    spooler spooling to a 100 or 10Mb older printer. This disrupts the card and the VLAN cannot attach to it until the spooler is dona nd the card can switch.  It can also be caused by a bad card or a bad switch.
    Then VLAN vendors techs are usually very good at troubleshooting this kind of issue.  Remote VLAN logging and diagnostics can also pick out the issue.
    ¯\_(ツ)_/¯

  • Task scheduler service fails to run after windows update

    OS: W2008R2x64
    We noticed that our daily tasks are not running anymore since the last windows updates few days ago. When running the task scheduler mmc, we get the following:
    Looking further, the service did not seems to be running. If we try to start the service we get the follow message:
    "The Task Scheduler service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs."
    Now we noticed that did problem started after following updates, though not all machines are infected!!:
    Cumulative Security Update for Internet Explorer 9 for Windows Server 2008 R2 x64 Edition (KB2925418)
    Security Update for Windows Server 2008 R2 x64 Edition (KB2930275)
    Windows Malicious Software Removal Tool x64 - March 2014 (KB890830)
    Update for Windows Server 2008 R2 x64 Edition (KB2929733)

    Hi,
    Here is a similar thread for your reference, please go through it and troubleshoot the issue:
    http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/task-scheduler-wont-start/11394a52-d7de-496b-880b-733123579b9b
    Regards,
    Yan Li
    Regards, Yan Li

  • Running SFTP from script but Task Scheduler does not like part of it.

    Hello,
    I am trying to do some (not so) simple file copying using SFTP in this manner:
     1) Map a drive to the destination, the SFTP program will not accept UNC paths
     2) Use SFTP to copy the files to the target Server
     3) Write a Timestamped entry to a log file
     4) Remove the source files after copy
     5) Remove the drive mapping
    Everything works but Step two and that only fails running from the Task Scheduler (W2K8 R2).  Running from the command line directly in PowerShell or using the Run box works fine all the way.
    The sftp program is BitVise SSH Client using their log utility.  The makes the command line very complicated.
    The line I use in the Scheduler is powershell "D:\Scripts\SFTP_TPCCommission.ps1" Dev  I have also tried using the -command parameter.  Again, it only does not work in the scheduler.
    Here is how I invoke it:
    $CmdLine = "`"D:\\Program Files (x86)\\Bitvise SSH Client\\logs\\`" sftpc " + $Server + " -pk=1 -cmd=`"put -o -lf Z:\" + $File + " /TPCCommissions`""
    & log ($CmdLine)
    I have also tried a Here String to do the same thing.  It works the same way.
    $ArgText = @"
    "D:\\Program Files (x86)\\Bitvise SSH Client\\logs\\" sftpc $Server -pk=1 -cmd="put -o -lf Z:\$File /TPCCommissions"
    Any ideas?

    In a batch file or at the command (not PS) line the command structure looks like this:
    log "D:\\Program Files (x86)\\Bitvise SSH Client\\logs\\" sftpc <user@server> -pk=1 -cmd="put -o -lf Z:\<Source> /<Destination>"
    The double slashes are requirement of the log program which calls the sftpc program with its command structure.
    The double-quoted section after "-cmd=" is required.  The Z: drive is mapped because the SFTP program does not support UNC paths. (Stupid, but that is all I have to work with.
    What you see in my post is just the part giving me trouble.  I am using PS to keep track of what I am copying to the destination and removing from the source and creating a timestamped log of that activity.
    As to the comment about Task Scheduler, I am using it.  Like I said, it all works fine from anywhere but the Task Scheduler.

  • Error when using Windows Task Scheduler in C#

    I am using Windows Task Scheduler in my Visual C# application. I add the reference to C:\Windows\SysWOW64\taskschd.dll (on a 64-bit system), and Visual Studio creates a COM wrapper Interop.TaskScheduler.dll. Ths works fine on Windows 7. However, when
    I run on Windows 8.1, I get the following error:
    Unable to cast COM object of type 'System.__ComObject' to interface type 'TaskScheduler.IExecAction'.
    This operation failed because the QueryInterface call on the COM component for the interface with IID
    '{4C3D624D-FD6B-49A3-B9B7-09CB3CD3F047}' failed due to the following error:
    No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
    I noticed that on Windows 7, the above GUID exists in the registry under HKEY_CLASSES_ROOT\Interface, with the value "IExecAction". But on Windows 8.1, there is no such GUID, and no key with value "IExecAction". I use IExecAction
    in my code.
    When I develop on Windows 8.1, the program compiles, but at runtime I get the above error.

    Hello tomszms,
    Here is a blog related to this issue and the troubleshoot steps of his error is very useful for your case, so please check for it:
    http://blogs.msdn.com/b/smondal/archive/2012/10/02/unable-to-cast-com-object-of-type-system-comobject-to-interface-type-microsoft-visualstudio-ole-interop-iserviceprovider.aspx
    Please try use the same way to track the logs and then try use the regsvr32
    on your Win 8 machine to re-register that dll and see the result.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for