This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Some Edition crontab
#1
Some Edition crontab
Hello 

First things apologize for my bad english ..
today i fixed alot cron job delete issues and added 15 mins cron tab
when add cron job with cron manager .. its Okie
then i delete cron job in my panel .. its deleted on panel ..
but still not delete on root SQL DB  .. sentora_core => x_cronjobs list
then i delete some core from etc/sentora/panel/modules/cron/code/controller.ext.php


Here how to fix 

  static function doDeleteCron()
    {
        global $zdbh;
        global $controller;
        runtime_csfr:Tonguerotect();
        $currentuser = ctrl_users::GetUserDetail();
        $sql = "SELECT COUNT(*) FROM x_cronjobs WHERE ct_acc_fk=:userid AND ct_deleted_ts IS NULL";
        $numrows = $zdbh->prepare($sql);
        $numrows->bindParam(':userid', $currentuser['userid']);
        if ($numrows->execute()) {
            if ($numrows->fetchColumn() <> 0) {
                $sql = $zdbh->prepare("SELECT * FROM x_cronjobs WHERE ct_acc_fk=:userid AND ct_deleted_ts IS NULL");
                $sql->bindParam(':userid', $currentuser['userid']);
                $sql->execute();
                while ($rowcrons = $sql->fetch()) {
                    if (!fs_director::CheckForEmptyValue($controller->GetControllerRequest('FORM', 'inDelete_' . $rowcrons['ct_id_pk'] . ''))) {

                        $sql2 = $zdbh->prepare("UPDATE x_cronjobs SET ct_deleted_ts=:time WHERE ct_id_pk=:cronid"); 
<= delete and replace with this =>
                        $sql2 = $zdbh->prepare("DELETE FROM x_cronjobs WHERE ct_id_pk=:cronid"); 

                        $sql2->bindParam(':cronid', $rowcrons['ct_id_pk']);

                        $sql2->bindParam(':time', time());   <= delete this one
                        $sql2->execute();
                        self::WriteCronFile();
                       self::$ok = TRUE;
                        return;
                    }
                }
            }
        }
        self::$error = TRUE;
        return;
    }



15 Mins cronjob added


static function getCreateCron()

add this line under of Every 10 minutes

$line .= "<option value=\"0,15,30,45 * * * *\">" . ui_language::translate("Every 15 minutes") . "</option>";



static function TranslateTiming($timing)

add this line under of Every 10 minutes

if ($timing == "0,15,30,45 * * * *") {
            $retval = "Every 15 minutes";
        }


//// done ////

If somethings wrong pls help me admin !
Reply
Thanks given by:


Messages In This Thread
Some Edition crontab - by superstarnetworks - 08-15-2017, 12:56 AM
RE: Some Edition crontab - by TGates - 08-15-2017, 01:38 AM
RE: Some Edition crontab - by superstarnetworks - 08-15-2017, 01:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Some Edition crontab QTVLegend 1 4 ,779 04-26-2018, 01:21 AM
Last Post: TGates
Crontab not function CJsent 10 26 ,693 10-17-2017, 08:55 PM
Last Post: betatester3.0

Forum Jump:


Users browsing this thread: 1 Guest(s)