Updating the index of a for loop in crontab

I have a variable called missing_possid that contains 212 integer values. This variable is the possession ID of each possession in a basketball game. I'm trying to create gganimate generated animations and save that to a gif using make_poss_gif function. I'm trying to run this function in a for loop, as you can see below:

# For loop
for (possid in missing_possid) {

Each iteration takes 1-2 minutes to load, so I'd like to use crontab to execute this task every day. What I'd want is crontab to run the first 10 values on the first day, the next 10 values on the second day, etc...

I've used crontab to run a R script once, but I've never had to deal with the indexes inside a for loop before, so I have no idea where to start!

Thank you!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.