[Samba] task scheduler in Samba ?
Jonathan Johnson
jon at sutinen.com
Tue Jul 19 20:33:17 GMT 2005
Gerald (Jerry) Carter wrote:
> I looked into this some more. It's works a little
> differently than I initially thought. The registry
> paths are used to detect the presence of the task
> scheduling agent on the remote host. The actual jobs
> are simply stored as files.
>
> In my mind this would fit pretty well as just
> a ~/cron directory for a given user. For example,
> it I run a job as jerry, then the job script would
> be stored in ~jerry/cron and a crontab entry would
> be made in /var/spool/cron/jerry.
>
> I'm still thinking this over. The other detail
> is to figure out the file format used to present
> the job properties dialog to Windows. This is
> probably already decoded somewhere (similar to
> *lnk files or something).
FYI/FWIW, on my Windows XP machine, the jobs in the local task scheduler
are binary files located in the hidden folder %SYSTEMROOT%\Tasks\ with a
filename extension of .job.
This folder is one of those "special" folders that Windows Explorer
displays differently. You can't copy files into or out of this folder
using Explorer, nor can you view any files other than .job files. To
copy into, out of, or list the contents of this folder, you're pretty
much stuck with a command shell.
To display the properties of a scheduled task, the library mstask.dll is
used. Some of the relevent registry keys (an incomplete list) used are:
HKEY_CLASSES_ROOT\.job
HKEY_CLASSES_ROOT\JobObject
(Note, there are several other similarly named keys)
HKEY_CLASSES_ROOT\CLSID\{148BD520-A2AB-11CE-B11F-00AA00530503}
HKEY_CLASSES_ROOT\CLSID\{148BD52A-A2AB-11CE-B11F-00AA00530503}
Also, you may find the command line interface to the task scheduler,
schtasks.exe, useful. Documentation can be found here:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/schtasks.mspx
Hope this helps you & the developers, Jerry. Maybe you already knew all
this. :-)
--Jonathan Johnson
Sutinen Consulting, Inc.
jon at sutinen.com
More information about the samba
mailing list