Skip to content

Task Scheduling Readme Update #37

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

silvercrown27
Copy link

Task scheduling in laravel 11

Task scheduling in laravel 11
@@ -135,6 +135,16 @@ protected function schedule(Schedule $schedule)
$schedule->command('otp:clean')->daily();
}
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave a newline

README.md Outdated
@@ -135,6 +135,16 @@ protected function schedule(Schedule $schedule)
$schedule->command('otp:clean')->daily();
}
```
In laravel 11 the `app/Console/Kernel.php` was removed, to schedule a task, add this to the `routes/console.php`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave a newline before the code sample

README.md Outdated

Schedule::command('otp:clean')->daily();
```
check if your task has been added to schedule using command:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave a newline after the code sample

README.md Outdated
Schedule::command('otp:clean')->daily();
```
check if your task has been added to schedule using command:
`php artisan schedule:list`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

php artisan schedule:list

should be a code sample with bash as opposed to php artisan schedule:list

leave a new line before and after its declaration

Copy link
Owner

@ichtrojan ichtrojan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropped a few comments

Added requested changes to the readme 👍
@@ -136,6 +136,21 @@ protected function schedule(Schedule $schedule)
}
```

In Laravel 11, the `app/Console/Kernel.php` file has been removed. To schedule a task, you can now add it directly to `routes/console.php` as follows:
```php
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave a newline

```

You can check if your task has been added to the schedule by using the following artisan command:
```bash
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave a newline

php artisan schedule:list
```


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove excess newline

Copy link
Owner

@ichtrojan ichtrojan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more updates required

@ichtrojan ichtrojan changed the title Update README.md Task Scheduling Readme Update Dec 23, 2024
@ichtrojan
Copy link
Owner

Bumping this up

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants