perlmeditation
ybiC
<h2>Introduction</h2>
<tt>at.exe</tt> is a commandline scheduler on Win32, similar in concept to *nix <tt>cron</tt> and <tt>at</tt>. It's run from a <tt>cmd.exe</tt> window, and allows you to add, remove, and view scheduled commands. Other tools exist for MS-Windows scheduling, but are outside the scope of this document.
<readmore>
<h2>Examples</h2>
<p>
(<code>at time /date command</code>)
</p>
<p>
<code>at 2:00 /every:Th C:\Perl\bin\perl.exe C:\perls\foo.pl --options --and --arguments</code>
</p>
<p>
<code>at 14:00 /next:T C:\Perl\bin\perl.exe C:\perls\foo.pl --options --and --arguments</code>
</p>
<h2>Caveats</h2>
<h3> Perl-Specific</h3>
<ul>
<li><tt>at.exe</tt> evidently runs in an environment with no path to perl.exe. Therefore the script must be called in this form: <tt>drive:\path\to\perl drive:\path\to\script.pl</tt>
</ul>
<h3> General</h3>
<ul>
<li><tt>cmd.exe</tt> commands apparantly cannot exceed 256 characters. See <tt>Win32::AdminMisc</tt> below to get around this.
<li><tt>at.exe</tt> is included only in true 32bit versions of MS-Windows <i>(NT, 2k, XP)</i>, and isn't part of 16bit versions of MS-Windows <i>(3.(0|1)|9(5|8)|me)</i>. If one of the latter group is your development platform, you have my deepest condolances. <tt>%^P</tt>
</ul>
<ul>
<li>Mistakes in this doc are quite possible - corrections, additions, and rotton kiwifruit welcome. Well, maybe not the rotton fruit.
</ul>
<h2>See Also</h2>
<h3> PerlMonks</h3>
<ul>
<li>[id://47981]
<li>[id://170633]
<li>[id://125966] <i>(added postfacto)</i> <!-- cron in perl -->
</ul>
<h3> Roth</h3>
<ul>
<li>[http://www.roth.net/perl/adminmisc/#ScheduleAdd|Win32::AdminMisc - ScheduleAdd()]
<li>[http://www.roth.net/perl/adminmisc/#ScheduleDel|Win32::AdminMisc - ScheduleDel()]
<li>[http://www.roth.net/perl/adminmisc/#ScheduleGet|Win32::AdminMisc - ScheduleGet()]
<li>[http://www.roth.net/perl/adminmisc/#ScheduleList|Win32::AdminMisc - ScheduleList()]
</ul>
<h3> ActiveState</h3>
<ul>
<li>[http://aspn.activestate.com/ASPN/Modules/Perl/dist_html?dist_id=9593|Schedule::At]
</ul>
<h3> CPAN</h3>
<ul>
<li>[cpan://Schedule::At]
</ul>
<h3> Microsoft support</h3>
<ul>
<li>[http://support.microsoft.com/default.aspx?scid=kb;en-us;220149|AT Tasks Cannot Be Viewed Using the Task Scheduler Tool]
<li>[http://support.microsoft.com/default.aspx?scid=kb;en-us;226795|HOW TO: Modify a Scheduled Task to Repeat By Minutes or Hours]
<li>[http://support.microsoft.com/default.aspx?scid=kb;en-us;235536|Task Scheduler Service on Windows NT]
<li>[http://support.microsoft.com/default.aspx?scid=kb;en-us;304288|A Task That Is Scheduled with the AT Command May Stop After 72 Hours]
<li>[http://support.microsoft.com/default.aspx?scid=kb;en-us;313565|HOW TO: Use the AT Command to Schedule Tasks]
</ul>
<h3> Local help</h3>
<ul>
<li><tt>at /?</tt>
</ul>
<p>
<i>Thanks to a monk or three <sup>(you know who you are)</sup> for pre-post critique, who shall remain nameless lest the sins of this post be visited upon them verily unto three generations</i>
</p>
<p>
<b>Update: </b> thanks to to replying monks for pointing out what appears to be substantial problems with win32 <tt>at</tt>. I've not encountered problems myself, but have no reason to doubt that they exist. <b>Please, read the rest of this thread for yourself *before* using my examples in any situation that's at all important.</b> Caveat Usor
</p>