Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 15:25:05

Author Topic: [CRITICAL] Editing advanced cron reset all values to 0  (Read 14966 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Editing advanced cron reset all values to 0 even when they are different.
« Last Edit: 2015-07-04, 21:03:15 by Spacedust »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Customer was able not to choose a minute in cron !
« Reply #1 on: 2015-06-09, 18:55:10 »
Did you select 'Enable Cron For All Users' in 'General Settings'?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Customer was able not to choose a minute in cron !
« Reply #2 on: 2015-06-09, 19:00:42 »
Did you select 'Enable Cron For All Users' in 'General Settings'?.

Yes. Just a correction:

Customer is able to add cron with minutes etc. but only first entry is actually added to the server.

If you try to edit cron entry then it shows "Field cannot be empty" and removes cron minute from the list so for example instead showing 0 it shows "-" instead.

I'm testing latest Kloxo-MR now. Maybe there was some troubles with translation.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Customer was able not to choose a minute in cron !
« Reply #3 on: 2015-06-09, 19:11:52 »
See cronjob logs:

18:11 Jun/09/2015: 1: "/home/tmp/lxtmp__var_spool_cron_ldusav3bHRg":2: bad hourerrors in crontab file, can't install. [(__system__) 'crontab'  '-u' 'ldusa' '/home/tmp/lxtmp__var_spool_cron_ldusav3bHRg']
18:13 Jun/09/2015: 1: "/home/tmp/lxtmp__var_spool_cron_ldusaNxM5Af":2: bad hourerrors in crontab file, can't install. [(__system__) 'crontab'  '-u' 'ldusa' '/home/tmp/lxtmp__var_spool_cron_ldusaNxM5Af']

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Customer was able not to choose a minute in cron !
« Reply #4 on: 2015-06-09, 19:48:26 »
It happens always if I add more than one cron job entry on all customers !
« Last Edit: 2015-06-09, 19:51:28 by Spacedust »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Adding more than one cron job does not work
« Reply #5 on: 2015-06-09, 20:05:25 »
Just tested my very old Kloxo-MR installation Kloxo-MR 7.0.0.b-2015050301 and this bug persists.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
It works fine in Kloxo-MR 7.0.0.b-2015041302

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Using the same phpXYs?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Using the same phpXYs?.

Yes. Always php54s. Restored old cronlib.php and it works fine on production server too. I needed to readd all cron entries from last month !

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Open '/usr/local/lxlabs/kloxo/httpdocs/driver/pserver/cronlib.php' and change:

from:
Code: [Select]
function postAdd()
{
// We need to write because reads everything from the database.
$this->write();

if (!$this->isSimple()) {
$this->checkIfNull();
$this->convertAll();
}
}

to:
Code: [Select]
function postAdd()
{
if (!$this->isSimple()) {
$this->checkIfNull();
$this->convertAll();
}

// We need to write because reads everything from the database.
$this->write();
}
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
It works, but trying to fix wrongly added entries always shows 0 in complex cron Minute:

"Field cannot be blank"

then on the list a proper minute is replaced by -

Is there anyway to fix these entires without readding them ?

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Still some errors when adding new entires but not always. Please investigate !

Example adding something like this:

    sjk2014    http://newsfakt.pl/cron-10min.php    localhost    complex    39    --all--    --all--    --all--    --all--

Then trying to edit and saving does not work properly.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Try add '/usr/local/lxlabs/kloxo/pscript/fixcron' with content:
Code: [Select]
#!/bin/sh

. /script/directory
lxphp.exe ../bin/cronfix.php $*
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Still some errors when adding new entires but not always. Please investigate !

Example adding something like this:

    sjk2014    http://newsfakt.pl/cron-10min.php    localhost    complex    39    --all--    --all--    --all--    --all--

Then trying to edit and saving does not work properly.

So, try change to:
Code: [Select]
function postAdd()
{
if (!$this->isSimple()) {
$this->checkIfNull();
$this->convertAll();
}

// We need to write because reads everything from the database.
//$this->write();
}
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Also change to '//   $this->write();' for 'function postUpdate()'
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix

Page created in 0.029 seconds with 22 queries.

web stats analysis