Operating System Vista Task Sceduler - No Next Run Time After Reboot (1 Viewer)

gperkinson

Portal Pro
October 28, 2008
470
3
Auckland
Home Country
New Zealand New Zealand
Hi All,

I notice to reschedule the task again manually, all I need to do is select the properties of the task and go OK i.e. simply open and close the task via the properties.

Was thinking I could write a quick "bat" file to do this? Of course I will need to schedule this .... but I thought perhaps this could be executed in MP or it might just simply work - I seem to remember I had a bat file previously which rescheduled in Task Manager OK for EPG download.

I guess what I'm after is how to write a bat file that will do the above.

Can anybody help with that please.

Thanks

Graham
 

MLH01

MP Donator
  • Premium Supporter
  • March 11, 2009
    158
    23
    Gold Coast
    Home Country
    Australia Australia
    Hi Graham,

    I was doing a bit more thinking on this, and have come up with a potential solution. Not quite what you are asking in your most recent post though.

    It involves using the command line tool for managing/creating scheduled tasks called schtasks.exe.

    Information on its use can be found here.

    What you could do is set up a batch file to execute schtasks.exe with the correct parameters (to run daily at a specified time) to execute your reboot script. Then set this batch file to run at startup (or from resume via the MediaPortal PowerScheduler plugin).

    This way, each time your HTPC starts or resumes, it will execute the batch file and 'create' the task.

    Maybe that will do the job?

    EDIT: For a reboot script, you'd only need to set the batch file to run at startup :)

    MLH01.
     

    gperkinson

    Portal Pro
    October 28, 2008
    470
    3
    Auckland
    Home Country
    New Zealand New Zealand
    Hi MLH01,

    Thanks for the reply and yeah, I think the bat file within the Powerscheduler could be a good idea. Could I not just run the task I currently have setup in Task Scheduler in Powerscheduler??? .... within a bat file?

    The shutdown command I'm using in Task Scheduler is simply executing C:\Windows\System 32\Shutdown.exe with /g as the parameter.

    Is that what I simply write in a bat file and then point to in Powerscheduler to execute - do you think that would work rather then executing the Task with Task Scheduler .... I'm thinking that may not be required??

    You r thoughts??

    If you don't think that would work and I should run with your suggestion of executing the Task within Task Scheduler, I'm still a bit confused about how to write the script from the link you pointed me too. Could you please suggest what I need.

    Again, thanks for your help - it could be an easy fix.

    Got to head to bed.

    Regards

    Graham
     

    MLH01

    MP Donator
  • Premium Supporter
  • March 11, 2009
    158
    23
    Gold Coast
    Home Country
    Australia Australia
    OK. I've tried the same reboot script on both computers I have. One is the HTPC with no logon password (so that it boots straight into Vista). The other one requires a password to logon to Vista.

    The HTPC has the same issue as what you are experiencing - the 'next run time' is not set after a reboot. I am guessing that this is by design as a security feature.

    The other PC does set the next run time correctly, but only after logging on as the user who created the schedule. On mine, the user who created the schedule has admin rights, but is not the full admin AFAIK.

    I recall in an earlier post that you need to set up the schedule as full admin, but am not sure if you've already tried this. I will give it a go later on the HTPC to see if it can boot without a password and set the 'next run time' for the scheduled reboot task.

    I am pretty confident that this can be done, as a similar reboot function is available on the Media center Standby Tool. Just a matter of getting the settings right.

    I'll post back later.
    MLH01.
     

    gperkinson

    Portal Pro
    October 28, 2008
    470
    3
    Auckland
    Home Country
    New Zealand New Zealand
    Hi MLH01,

    Many thanks for the reply and confirming back your findings which are exactly what I'm experiancing i.e. no next scheduled date with user with admin rights OR logging on as Administrator and being asked for a password (therefore not being able to boot)

    Keen to get around this with a "bat" file of some description as discussed previously either opening task manager, opening the reboot task via properties and closing again (to automatically set the next task) or using Powerscheduler with a command line and bat file to do the reboot.

    Look forward to your response. Would be keen to know the bat file script with anything you get running.

    Regards

    Graham
     

    MLH01

    MP Donator
  • Premium Supporter
  • March 11, 2009
    158
    23
    Gold Coast
    Home Country
    Australia Australia
    I have run into an obstacle with this. I have enabled the full admin account as per Paranoid Delusion's link * here *.

    I don't want to remove my current user account in case it deletes the files in it. Is there a way to disable a user so that it does not appear in the logon screen? The problem is if there are 2 or more users in the logon screen, the PC will wait at the logon screen after reboot. This would not be satisfactory for a PC that is set up to record at various times, as you'd want it to boot straight into the required account and run the TV service to perform subsequent recordings.

    Anyone know a way of disabling all user accounts except one (the full admin account in this case), and without removing user files from the disabled accounts? If it can be done, then I'd be happy to try this all out. I don't want to try something that will break my HTPC (WAF will drop even further) :)

    I guess that is the reason the linked site recommends doing this after a fresh install...

    MLH01.

    EDIT:
    Found out how to disbale a user account without deleting the data - net user <username> /active:no (NOT to be done on the main account. At least one account with administrator priveleges must be active - i.e. enable an administrator account before disabling another). To re-enable, use 'yes' instead of 'no'.
     

    MLH01

    MP Donator
  • Premium Supporter
  • March 11, 2009
    158
    23
    Gold Coast
    Home Country
    Australia Australia
    Scheduled reboot on Vista Home Premium

    I have enabled the full admin account and then disabled the user account with admin priveleges as described in my previous post.

    With only the full admin account active, I can now schedule the reboot and have it reset the 'next run time' ready for the next day.

    Steps to reproduce (Important: Steps 1 & 2 MUST be done before step 3, or you may have problems booting into Vista! You have been warned :)):
    1. Enable full admin account (described here). Do not set a password on this account, or it will not reboot into Vista and record programs until a password has been entered.
    2. Log off to ensure the full admin username is present on the login screen, along with the original username. If not, do not continue.
    3. Login as the full administrator, then disable (not delete) original user account that had admin priveleges, described in the previous post using the 'net user...' command.
    4. Reboot. The PC should boot back into Vista with the full admin account (without a logon screen asking for passwords).
    5. Check/change settings in TVServer config and MPconfig to ensure all TV-related settings (such as server name) are correct.
    6. Check that MediaPortal works as expected.
    7. Create the reboot schedule under the full admin account.

    Note that this setup is not very secure, as anyone using the PC has full admin rights. You'll need to be careful with adding/changing/modifying settings! UAC is not enabled for the full admin account by default either. Can anyone out there describe a way to make it more secure, if possible?

    I plan to have this running for a few days to see how it goes.

    To reverse these changes (again, order is important):
    1. Enable the original user account with admin priveleges.
    2. Disable the full admin account.
    3. Reboot, then repeat steps 5 and 6 above.

    Disclaimer: Change account details at your own risk. The above steps worked for me. I will not accept responsibility for problems others may experience :D

    MLH01.
     

    gperkinson

    Portal Pro
    October 28, 2008
    470
    3
    Auckland
    Home Country
    New Zealand New Zealand
    Hi MHL01,

    I totally appreciate the work you have done testing the full Administrator A/c login and writing instructions.

    Keen to hear how you go over the next few days.

    Sounds like Ray (Paranoid Delusion) was spot on with his answer.

    Regards

    Graham
     

    MLH01

    MP Donator
  • Premium Supporter
  • March 11, 2009
    158
    23
    Gold Coast
    Home Country
    Australia Australia
    Hi MHL01,

    I totally appreciate the work you have done testing the full Administrator A/c login and writing instructions.

    Keen to hear how you go over the next few days.

    Sounds like Ray (Paranoid Delusion) was spot on with his answer.

    Regards

    Graham
    Yes, I ended up doing what PD had suggested :)thx: Ray!)

    I will post back in a day or two after a couple of unattended reboot cycles...

    MLH01.

    Update 1: My system rebooted at 2:18am this morning (scheduled at 2:00am, but I added a condition of waiting for the PC to be idle for 10 minutes before running the reboot script - I don't want it to reboot if it is doing something important when it wakes up). The next run time is set for 2:00am tomorrow morning. So far it is working well.
     

    Users who are viewing this thread

    Top Bottom