For the custom task to clear itself from Active Tasks you may be able to switch out pxelinux with ipxe. Using the following embedded script to undionly.kpxe will send the mac to a php script on your web server which can delete the task. This method would delete the active task before it has finished though which may not be desirable in your environment.
-fogboot.ipxe
[CODE]#!ipxe
dhcp
chain http://1.1.1.1/images/boot.php?mac=${net0/mac}&asset=${asset:uristring}
boot[/CODE]
-build command
[CODE]make bin/undionly.kpxe EMBED=fogboot.ipxe[/CODE]
-sample boot.php
[CODE]<?php
$mac = urldecode($_GET[‘mac’]);
// Do some stuff with the mac here…
$fogServer = “1.1.1.1”;
$kernel = “images/bzImage”;
$kernelOptions = “root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= mode=onlydebug”
$initrd = “images/init.gz”;
echo writeIPXE($fogServer, $kernel, $kernelOptions, $initrd);
function writeIPXE($fogServer, $kernel, $kernelOptions, $initrd){
$ipxe = <<<DOC
#!ipxe
kernel http://$fogServer/$kernel $kernelOptions
initrd http://$fogServer/$initrd
boot
DOC;
return $ipxe;
}
?>[/CODE]