Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Resolved] How do I use /controller/cron.php ? #178

Open
muzudho opened this issue Feb 19, 2016 · 1 comment
Open

[Resolved] How do I use /controller/cron.php ? #178

muzudho opened this issue Feb 19, 2016 · 1 comment

Comments

@muzudho
Copy link

muzudho commented Feb 19, 2016

Hi!
I have a question.

I guess. execute() function of \Goteo\Core\Controller Cron class is very important.
I guess. This is timer of projects.

But, I don't know cron settings. I can not find document.
I want to look sample calls of cron.
For example, how to write a shell file.

:-)

@muzudho
Copy link
Author

muzudho commented Feb 22, 2016

I resoluved.

In my case.

Step 1.

I modify source code.

/controller/cron.php 596-597

        // (^q^)2016-02-21 20:43 Deleted
        // // checkeamos campanas activas
        // $campaigns = Model\Call::getActive(4);
        // (^q^)2016-02-21 20:43 Add
        $campaigns = array();

/controller/cron.php 329-337

                            //(^q^)2016-02-22 15:40 Deleted. Recording contract is created
                            // // se crea el registro de contrato
                            // if (Model\Contract::create($project->id, $errors)) {
                            //     echo ' -> Ok:: se ha creado el registro de contrato';
                            // } else {
                            //     @mail(\GOTEO_FAIL_MAIL,
                            //         'Fallo al crear registro de contrato ' . SITE_URL,
                            //         'Fallo al crear registro de contrato para el proyecto '.$project->name.': ' . implode(',', $errors));
                            //     echo ' -> semi-Ok: se ha actualiuzado el estado del proyecto pero ha fallado al crear el registro de contrato. ERROR: ' . implode(',', $errors);
                            // }

Because,
Goteo\Model\Call Class not found.
Goteo\Model\Contract Class not found.

Step 2.

I delete block file ( after error).
/logs/cron-execute.block

Step 3.

Create a projects (for test).

Step 4.

Log in by root user. (sysadmin)

Step 5.

URL access to "http://localhost/cron/execute".

:-)

@muzudho muzudho changed the title How do I use /controller/cron.php ? [Resolved] How do I use /controller/cron.php ? Feb 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant