Skip to content

Commit 409ca80

Browse files
committed
Fix bug with next task
1 parent 65c80ea commit 409ca80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

solana-programs/programs/cron/src/instructions/queue_cron_tasks_v0.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ pub fn handler(ctx: Context<QueueCronTasksV0>) -> Result<RunTaskReturnV0> {
165165

166166
// Past all the CronJobTransaction are the free tasks
167167
ctx.accounts.cron_job.next_schedule_task =
168-
ctx.remaining_accounts[num_tasks_to_queue as usize].key();
168+
ctx.remaining_accounts[ctx.accounts.cron_job.num_tasks_per_queue_call as usize].key();
169169

170170
let res = write_return_tasks(WriteReturnTasksArgs {
171171
program_id: crate::ID,

0 commit comments

Comments
 (0)