+ Post New Thread
Results 1 to 13 of 13
Windows Server 2008 Thread, Group Policy Preferences - Scheduled Tasks in Technical; Has anyone used GPP to manage scheduled tasks? I'm trying to schedule disk defragmenter on our XP clients and the ...
  1. #1
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,217
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    75

    Group Policy Preferences - Scheduled Tasks

    Has anyone used GPP to manage scheduled tasks?

    I'm trying to schedule disk defragmenter on our XP clients and the task keeps appearing with quotes around it which causes the job to fail, if I remove the quotes the job runs. Also if I move the closing quotes to before C: it will run the problem is that GPP won't create it like that even though that's the command that I entered in the GPP console.

    Code:
    "C:\Windows\System32\defrag.exe" C:
    Below is the error due to the quotes

    "Defrag.job" () 17/08/2009 16:21:27 ** ERROR **
    Unable to start task.
    The specific error is:
    0x8007007b: The filename, directory name, or volume label syntax is incorrect.
    Try using the Task page Browse button to locate the application.
    Any ideas?

    Thanks.

  2. #2

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,266
    Thank Post
    242
    Thanked 1,575 Times in 1,254 Posts
    Rep Power
    341
    It is perfectly normal for the job to have quotes, even if the path name has no spaces. Usually Scheduled Tasks fail due to permissions, but clearly that isn't the problem in this case. If you create the job manually on a machine instead of using the GPP, does this work as it should?

  3. #3
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,217
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    75
    It is normal for the command to have quotes but it doesn't seem to like the space then the C: command (in this case). If I create the job manually without the quotes it runs if I create it as GPP does it fails. I can also alter the job that is created by GPP and move the quote to before the C: and it runs.

    This is how GPP creates the job

    Code:
    "C:\Windows\System32\defrag.exe C:"

  4. #4

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,266
    Thank Post
    242
    Thanked 1,575 Times in 1,254 Posts
    Rep Power
    341
    Have you tried adding a forward slash before C: ?

    Code:
    C:\Windows\System32\defrag.exe /C:"

  5. #5

    DaveP's Avatar
    Join Date
    Oct 2006
    Location
    Can't talk now: The mother-ship is calling!
    Posts
    9,107
    Thank Post
    352
    Thanked 1,320 Times in 905 Posts
    Blog Entries
    4
    Rep Power
    1135
    I am trying to get Group Policy Preferences to add a scheduled task also [Run a PSShutdown script held on the server] I have waited for the task to arrive [be created] at the client end without success. Not sure what I am doing wrong.

    Has anyone successfully used GPP to do this?

    Thanks.

  6. #6
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,217
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    75
    I'll try a slash before the C tomorrow and let you know cheers.

    @ DaveP, it should work fine GPP creates the job for me it's just not running correctly, have you forced an update on the client? gpupdate /force

  7. #7

    Join Date
    Jan 2006
    Location
    Surburbia
    Posts
    2,178
    Thank Post
    74
    Thanked 307 Times in 243 Posts
    Rep Power
    115
    Uh.. are you putting the entire line in the GPP run field? You are supposed to split it like this:

    Run: C:\Windows\System32\defrag.exe
    Arguments: C:

  8. Thanks to PiqueABoo from:

    cookie_monster (18th August 2009)

  9. #8

    DaveP's Avatar
    Join Date
    Oct 2006
    Location
    Can't talk now: The mother-ship is calling!
    Posts
    9,107
    Thank Post
    352
    Thanked 1,320 Times in 905 Posts
    Blog Entries
    4
    Rep Power
    1135
    Quote Originally Posted by cookie_monster View Post
    ....have you forced an update on the client? gpupdate /force
    Hi,

    Yes I had thought of that. Tried a gpupdate /force and also tried waiting all weekend [set the GPP on Friday afternoon and checked the stations this morning. Nothing doing.

  10. #9
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,217
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    75
    @ PiqueABoo, i've not used GPP before (just moved to server 2008) for this as previously I used .bat files so I hadn't seen the arguments field, i'll take a look tomorrow.

    Thanks.

  11. #10

    Join Date
    Jun 2006
    Location
    Kendal
    Posts
    85
    Thank Post
    2
    Thanked 15 Times in 11 Posts
    Rep Power
    20
    What was the fix? I've just had the same error message pop up trying to deploy a scheduled task.

    0x8007007b: The filename, directory name, or volume label syntax is incorrect.

  12. #11
    Killer_Bot's Avatar
    Join Date
    Dec 2009
    Location
    Great Britain
    Posts
    75
    Thank Post
    5
    Thanked 13 Times in 12 Posts
    Rep Power
    12
    You may want to post a new thread Finch, this one's been dead for over 2 years

    Just a quick suggestion but have you checked what PiqueABoo suggested (i.e. keeping the arguments separate)

    Quote Originally Posted by PiqueABoo View Post
    Uh.. are you putting the entire line in the GPP run field? You are supposed to split it like this:

    Run: C:\Windows\System32\defrag.exe
    Arguments: C:

  13. #12

    Join Date
    May 2009
    Posts
    28
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    12
    which OS are you trying to deploy this to?
    We deploy scheduled tasks just fine using XP.

    I'll post my code tomorrow morning with our settings. it works awesome.

  14. #13

    Join Date
    Jun 2006
    Location
    Kendal
    Posts
    85
    Thank Post
    2
    Thanked 15 Times in 11 Posts
    Rep Power
    20
    Windows 7 and yep tried the suggestions here. I've encountered the exact same error message before using the printer section of gpp. Didn't solve it that time either. So not entirely sure it's syntax related.

    New thread started here..

    http://www.edugeek.net/forums/window...tml#post754450
    Last edited by Finch7; 16th November 2011 at 10:26 AM.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 15
    Last Post: 11th June 2009, 03:59 PM
  2. Group Policy Preferences
    By Stuart_C in forum Windows Server 2000/2003
    Replies: 2
    Last Post: 23rd March 2009, 03:42 PM
  3. scheduled tasks
    By techie08 in forum Windows
    Replies: 0
    Last Post: 15th December 2008, 02:05 PM
  4. Group Policy Preferences
    By cookie_monster in forum Windows Server 2008
    Replies: 9
    Last Post: 4th April 2008, 02:50 PM
  5. Looking for a little help with scheduled tasks
    By cromertech in forum Windows Vista
    Replies: 1
    Last Post: 8th February 2008, 04:28 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •