public MyNamedTasks()
            : base(new DirectoryInfo("tasks"))
        {
            this.Output = new DirectoryInfo("output");

#if DEBUG
            this.Scheduler = new SchedulerTask(this, "Scheduler", 400);
#else
            this.Scheduler = new SchedulerTask(this, "Scheduler", 4000);
#endif


            this.Task1_GatherSupply = new Task1.Task1(this);
            // dummy task
            //this.Task2_AliasSearch = new Task2.Task2(this);
            this.Task3_FindTorrents = new Task3_FindTorrents.Task3_FindTorrents(this);
            this.Task4_PrepareMedia = new Task4_PrepareMedia.Task4_PrepareMedia(this);
            //this.Task5_CloneMedia = new Task5_CloneMedia.Task5_CloneMedia(this);
            this.Task6_MediaCollector = new Task6_MediaCollector.Task6_MediaCollector(this);

            this.Disabled =
                delegate
            {
                Console.WriteLine("tasks are disabled (create subfolder tasks chmod 777)");
            };

            this.Default =
                Query =>
            {
                if (Query == "console")
                {
                    "<html>".ToConsole();
                    "<head>".ToConsole();
                    new IHTMLLink
                    {
                        Relationship = "alternate",
                        URL          = "http://localhost/jsc/zmovies/output/" + this.Task6_MediaCollector.Feed.Name,
                        //URL = "http://localhost:60177?feed0",
                        Type  = "application/rss+xml",
                        Title = "Goodies"
                    }.ToString().ToConsole();

                    "</head>".ToConsole();

                    "<body><center>".ToConsole();

                    if (this.Task6_MediaCollector.Feed.Exists)
                    {
                        ("age: " + (DateTime.Now - this.Task6_MediaCollector.Feed.LastWriteTime).Hours).ToConsole();
                    }

                    "Show tasks".ToLink("?overview", "Frame " + this.Scheduler.Counter).ToConsole();

                    "</center></body>".ToConsole();
                    "</html>".ToConsole();

                    return;
                }


                if (Query == "overview")
                {
                    ShowTasks();
                    return;
                }
            };
        }
        public MyNamedTasks()
            : base(new DirectoryInfo("tasks"))
        {
            this.Output = new DirectoryInfo("output");

            #if DEBUG
            this.Scheduler = new SchedulerTask(this, "Scheduler", 400);
            #else
            this.Scheduler = new SchedulerTask(this, "Scheduler", 4000);
            #endif

            this.Task1_GatherSupply = new Task1.Task1(this);
            // dummy task
            //this.Task2_AliasSearch = new Task2.Task2(this);
            this.Task3_FindTorrents = new Task3_FindTorrents.Task3_FindTorrents(this);
            this.Task4_PrepareMedia = new Task4_PrepareMedia.Task4_PrepareMedia(this);
            //this.Task5_CloneMedia = new Task5_CloneMedia.Task5_CloneMedia(this);
            this.Task6_MediaCollector = new Task6_MediaCollector.Task6_MediaCollector(this);

            this.Disabled =
                delegate
                {
                    Console.WriteLine("tasks are disabled (create subfolder tasks chmod 777)");
                };

            this.Default =
                Query =>
                {
                    if (Query == "console")
                    {
                        "<html>".ToConsole();
                        "<head>".ToConsole();
                        new IHTMLLink
                        {
                            Relationship = "alternate",
                            URL = "http://localhost/jsc/zmovies/output/" + this.Task6_MediaCollector.Feed.Name,
                            //URL = "http://localhost:60177?feed0",
                            Type = "application/rss+xml",
                            Title = "Goodies"
                        }.ToString().ToConsole();

                        "</head>".ToConsole();

                        "<body><center>".ToConsole();

                        if (this.Task6_MediaCollector.Feed.Exists)
                        {
                            ("age: " + (DateTime.Now - this.Task6_MediaCollector.Feed.LastWriteTime).Hours).ToConsole();
                        }

                        "Show tasks".ToLink("?overview", "Frame " + this.Scheduler.Counter).ToConsole();

                        "</center></body>".ToConsole();
                        "</html>".ToConsole();

                        return;
                    }

                    if (Query == "overview")
                    {
                        ShowTasks();
                        return;
                    }
                };
        }