Code Monkey home page Code Monkey logo

Comments (6)

deepakmanchanda avatar deepakmanchanda commented on September 27, 2024 2

I have setup up Cronkeep but cron not scheduling in Cronkeep, anybody tried ? if you have some solution please post ASAP

from cronkeep.

doblejou avatar doblejou commented on September 27, 2024

I have the same problem

from cronkeep.

RaspiGuru avatar RaspiGuru commented on September 27, 2024

RUN JOBS ON DEMAND NOT WORKING

Run cron jobs outside scheduled hours are not working. Even the message "Process Started" appears on the top of the page but nothing happens. Only the scheduled jobs are working fine.

from cronkeep.

Rico29 avatar Rico29 commented on September 27, 2024

Same problem here, tested with a cron job :

root@phservice:/var/www/cronkeep# sudo -u www-data crontab -l

test

*/2 * * * * echo date >> /tmp/date.txt

from cronkeep.

thytetgc avatar thytetgc commented on September 27, 2024

Has anyone managed to solve it?

from cronkeep.

ramponis avatar ramponis commented on September 27, 2024

Hi,

I'm not a php developer and my fix can be orrible, but it work
I have modified this part in index.php

/**
 * Runs a cron job in background.
 */
$app->get('/run/:hash', $setupJsonResponse, function($hash) use ($app) {
    $crontab = new Crontab();
    $job = $crontab->findByHash($hash);

    if ($job) {
        $crontab->run($job);

        $app->render(200, array(
            'error' => false,
            'msg' => 'Process started.'
        ));
    } else {
        $app->render(404, array(
            'error' => true,
            'msg' => 'Cron job no longer exists'
        ));
    }
});

This is my fix:

/**
 * Runs a cron job in background.
 */
$app->get('/run/:hash', $setupJsonResponse, function($hash) use ($app) {
    $crontab = new Crontab();
    $job = $crontab->findByHash($hash);
    $command = $job->getCommand();
    $name = $job->getComment();

    if ($job) {

// $crontab->run($job);

        shell_exec($command." >/dev/null 2>&1 &");
        $app->render(200, array(
            'error' => false,
            'msg' => 'Process '.$name.' Started. Command:'.$command
        ));
    } else {
        $app->render(404, array(
            'error' => true,
            'msg' => 'Cron job no longer exists'
        ));
    }
});

from cronkeep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.