Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

March 30, 2001 12:00 AM

Watch Out for Possible Problems with Task Scheduler, Cacls, and Xcacls

Windows IT Pro
InstantDoc ID #20510
Rating: (1)

For some time, I've been testing my scripts to ensure that they'll function correctly in Windows 2000. When I recently tested a few scripts on a server running Win2K Server Service Pack 1 (SP1), I ran into problems with three commonly used tools: Task Scheduler, Cacls, and Xcacls. Here are the details about those problems and the Microsoft hotfixes available to fix them.

The Task Scheduler Problems
If you schedule any scripts or tasks to run with the Task Scheduler (mstask.exe) in Microsoft Internet Explorer (IE) 5.0, your scripts or tasks might fail to run when scheduled or they might become hung in the Running state, as indicated on the Task Scheduler's GUI. These problems can occur if you're using IE 5.0's Task Scheduler on a server running Win2K Server, Windows NT Server 4.0, or Microsoft BackOffice Server 4.0. You need to watch for these symptoms:

  • Scripts or tasks take much longer than usual to complete.
  • Scripts or tasks don’t start at their scheduled time.
  • Unexpected failures occur in scripts that you've executed successfully in the past.
  • Clicking End Task doesn’t stop hung scripts or tasks.

To get the Task Scheduler to work again, you need to stop and restart the service. However, when I stopped and restarted it, the condition cleared only temporarily. Examination of the Task Scheduler logs didn't reveal any cause for these problems. The logs just showed the start time and the end time for when I stopped and restarted the service.

For more information about the Task Scheduler problems, see the Microsoft article "Mstask.exe Does Not Run Scheduled Jobs". On Microsoft TechNet, this article's ID number is Q272022.

The Cacls and Xcacls Problems
Win2K's Cacls command and the Microsoft Windows 2000 (Server or Professional) Resource Kit's Xcacls utility can potentially destroy permissions on file and folder structures. I recently attempted to use a script to modify permissions on Win2K Server. The script uses Win2K's Cacls command and the resource kit's Xcacls utility to remove permissions for one group and grant permissions to two other groups in several files and system folders. However, Cacls and Xcacls didn't apply the new permissions correctly, and they completely lost the old permissions. The final result was that the file and folder permissions became corrupted and defaulted to giving everyone Full Control permissions.

According to Microsoft, the problem lies in the ordering of the access control entries (ACEs). For more information about this problem, see the Microsoft article "Cacls.exe Orders ACEs Incorrectly When Granting Rights". On Microsoft TechNet, this article's ID number is Q268546.

Hotfixes Are Available
Hotfixes are available for Task Scheduler and Cacls but not Xcacls. (Because Xcacls is a resource kit utility, the corrected version will probably appear in a future resource kit supplement.) To solve the Task Scheduler and Cacls problems, you can obtain new versions of mstask.exe and cacls.exe, respectively. You need to contact Microsoft Product Support Services (PSS) at 800-936-4900 for these hotfixes. If you refer to the TechNet article ID numbers, PSS provides these hotfixes at no charge. PSS will give you an FTP download location and a password to open the self-extracting executable that contains the new files and the hotfix installer. However, these hotfixes aren't fully regression tested, so you'll need to evaluate them in a test environment before deploying them on production servers.

Related Content:

ARTICLE TOOLS

Comments
  • Henrik
    6 years ago
    Mar 22, 2006

    A better alternative to the built in Task Scheduler is VisualCron. http://www.visualcron.com

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.