routes/console.php or defined using Schedule::command() and Schedule::call().
Scheduled tasks are one of the primary execution contexts in Nightwatch, alongside requests and commands. Each task execution becomes the starting point of a new trace, where all subsequent events such as database queries and exceptions are captured and linked together to provide a complete picture of your application’s behavior.
Task List
View all scheduled tasks for an application from the Scheduled Tasks panel. Each task is displayed with its name, schedule, next run and execution times, including the average and p95 execution time.Task Details
Click on any task in the list to view its full details page, which shows the task’s performance over time. You can also see every individual execution of a task within it’s parent context. Clicking on an execution opens the full trace, showing the job within the context of its parent lifecycle.Sampling
Global Sampling
You can configure global sampling for scheduled tasks using theNIGHTWATCH_SCHEDULED_TASK_SAMPLE_RATE environment variable. When a scheduled task is sampled in, Nightwatch captures the full execution context, including related database queries, queued jobs, and exceptions. This environment variable takes precedence over NIGHTWATCH_COMMAND_SAMPLE_RATE when you schedule Artisan commands.
Sampling Specific Tasks
TheSample class allows you to apply sampling rates to individual scheduled tasks.
routes/console.php