crunz icon indicating copy to clipboard operation
crunz copied to clipboard

Task activity status

Open remitmaster opened this issue 2 years ago • 6 comments

Hi

Description
Sometimes you need to pause a task, and it would be nice if you could set a status for tasks.

  • Actively
  • Pause
  • Disabled

And so on, it would be good to think Also display the "Status" column in the schedule:list table

Example

use Crunz\Schedule;

$scheduler = new Schedule();
$task = $scheduler->run('command/to/execute');
$task
    ->description('Task description')
    ->in('path/to/your/command')
    ->preventOverlapping()
    ->everyThirtyMinutes()
    ->weekdays()

    ->setStatusPause() //  Set status
;

return $scheduler;

remitmaster avatar Oct 16 '23 14:10 remitmaster

Hello, what is your use case?

PabloKowalczyk avatar Nov 03 '23 11:11 PabloKowalczyk

Hello, sometimes you just need to pause the task for a while. Now either rename the file or remove the code in the task. It would be more convenient to simply display the status.

remitmaster avatar Nov 03 '23 17:11 remitmaster

But changing status will also require code change, so what is a gain?

PabloKowalczyk avatar Nov 06 '23 15:11 PabloKowalczyk

But changing status will also require code change, so what is a gain?

More convenient and beautiful. Also display the "Status" column in the schedule:list table

use Crunz\Schedule;

/*
$scheduler = new Schedule();
$task = $scheduler->run('command/to/execute');
$task
    ->description('Task description')
    ->in('path/to/your/command')
    ->preventOverlapping()
    ->everyThirtyMinutes()
    ->weekdays();

return $scheduler;
*/

or

use Crunz\Schedule;

$scheduler = new Schedule();
$task = $scheduler->run('command/to/execute');
$task
    ->description('Task description')
    ->in('path/to/your/command')
    ->preventOverlapping()
    ->everyThirtyMinutes()
    ->weekdays()

    ->setStatusPause() //  Set status
;

return $scheduler;

I would use :)

remitmaster avatar Nov 07 '23 06:11 remitmaster

Would you consider sponsoring (financially) this feature?

PabloKowalczyk avatar Nov 07 '23 06:11 PabloKowalczyk

Would you consider sponsoring (financially) this feature?

No, but I can try to implement it myself

remitmaster avatar Nov 07 '23 07:11 remitmaster