Coder Social home page Coder Social logo

scheduling's Introduction

Scheduling task manager for laravel-admin

StyleCI Packagist Total Downloads Pull request welcome

A web interface for manage task scheduling in laravel.

Documentation | 中文文档

Screenshot

wx20170810-101048

Installation

$ composer require laravel-admin-ext/scheduling


$ php artisan admin:import scheduling

Open http://your-host/admin/scheduling.

Try to add a scheduling task in app/Console/Kernel.php like this:

class Kernel extends ConsoleKernel
{
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('inspire')->everyTenMinutes();
        
        $schedule->command('route:list')->dailyAt('02:00');
    }
}

And you can find these tasks in scheduling panel.

License

Licensed under The MIT License (MIT).

scheduling's People

Contributors

doominating avatar jxlwqq avatar z-song avatar zsgsdesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

scheduling's Issues

Status: 419 unknown status :CSRF token mismatch,麻烦加一下

你好,

在laravel6.X最新版本里面发现的问题,运行自定义command时,点击“Run”时报错:

`Status: 419 unknown status
Cache-Control: no-cache, private
Date: Fri, 27 Mar 2020 03:09:17 GMT
Content-Type: application/json
Set-Cookie: laravel_session=eyJpdiI6IjNaNGlPRDZ0UUVma0s4QjlcLzVJZ1dRPT0iLCJ2YWx1ZSI6Ik1nZk5iNmRxXC9GUHVcLzJXajBDbWNLSVlZSWxRblRKRGJzOVQyRkNZOTdcL0piNzZVRWhVSnFheExBMEw2eWR0VHMiLCJtYWMiOiI0YWVmMjg1NTVlZTc2YTcxY2UxYTFlOTdiMjlmMjA2ZWZlZDQ1NWNjOGMwZTFmNzkxYTRmNTM3M2M4YmUxMTdmIn0%3D; expires=Fri, 27-Mar-2020 05:09:17 GMT; Max-Age=7200; path=/; httponly

{
"message": "CSRF token mismatch.",
"exception": "Symfony\Component\HttpKernel\Exception\HttpException",`

貌似是CSRF缺失,麻烦有空加一下。

谢谢
hqin2013

使用command方法打开页面报错

使用command方法打开页面报错。Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
使用call方法倒是没错

When running php artisan admin:import scheduling I get an error

$ php artisan admin:import scheduling
Symfony\Component\Debug\Exception\FatalThrowableError  : Class name must be a valid object or a string

at /Users/laravel/vendor/encore/laravel-admin/src/Extension.php:306
302|     protected static function createMenu($title, $uri, $icon = 'fa-bars', $parentId = 0)
303|     {
304|         $menuModel = config('admin.database.menu_model');
305| 
306|         $lastOrder = $menuModel::max('order'); 
307| 
308|         $menuModel::create([
309|             'parent_id' => $parentId,
310|             'order'     => $lastOrder + 1,

点击run按钮报错

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in D:\xampp\htdocs\laravel-admin\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php on line 68
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in D:\xampp\htdocs\laravel-admin\vendor\symfony\debug\Exception\FatalErrorException.php on line 1

'"artisan"' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

添加了一个测试:$schedule->command('route:list')->daily()->at('02:00');
执行会浏览器端500错误
task-schedule.output 文件中有这么一句:
'"artisan"' 不是内部或外部命令,也不是可运行的程序或批处理文件。

试着在Scheduling.php 中修改,
// if (Str::contains($event->command, ''artisan'')) {
if (Str::contains($event->command, '"artisan"')) {
前端是artisan显示没有双引号了,但运行错误仍然存在

点击run按钮 直接报错

output 内容:

In Connection.php line 664:

SQLSTATE[HY000] [2002] Unknown error while connecting (SQL: select name,
value from admin_config)

In Connector.php line 67:

SQLSTATE[HY000] [2002] Unknown error while connecting

SSL load

Hello, I think I found a bug...

$(function () {
        $('.run-task').click(function (e) {
            var id = $(this).data('id');
            NProgress.start();
            $.ajax({
                method: 'POST',
                url: 'http://XXX.repair/admin/scheduling/run',
                data: {id: id, _token: LA.token},
                success: function (data) {
                    if (typeof data === 'object') {
                        $('.output-box').removeClass('hide');
                        $('.output-box .output-body').html(data.data);
                    }
                    NProgress.done();
                }
            });
        });
    });

jQuery-2.1.4.min.js:4 Mixed Content: The page at 'https://XXX.repair/admin/scheduling' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://XXX.repair/admin/scheduling/run'. This request has been blocked; the content must be served over HTTPS.

In admin config
'secure' => TRUE,

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.