Crontab deletion

Discussion in 'Developers' Forum' started by branov, Jun 29, 2020.

  1. branov

    branov Member

    Hey, when deleting website which has created any crontab I got error "Parent domain not found" which is triggered by cron_plugin.inc.php, function delete, wherein the beginning is

    Code:
    //* get data from web
    $parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `document_root`, `hd_quota` FROM `web_domain` WHERE `domain_id` = ?", $data["old"]["parent_domain_id"]);
    if(!$parent_domain["domain_id"]) {
    $app->log("Parent domain not found", LOGLEVEL_WARN);
    return 0;
    }
    
    The query is empty of course because the record was deleted already when the website was deleted from GUI.

    The problem is, when crontab is not deleted and it contains username assigned for deleted website, this user is no longer available in the system and other crons after this crontab (in alphabet order) file stop working.
     
    Last edited: Jun 29, 2020
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please make an issue for that in the issue tracker at git.ispconfig.org
     
    branov likes this.

Share This Page