import re


def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\schtasks.exe"),
            " /delete " in event.deep_get("CommandLine", default=""),
            re.match(r"^.*/tn \\.*.*$", event.deep_get("CommandLine", default="")),
            " /f" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
