Cron and numbers

by k

Imagine you would like to run a process every so many minutes. You don’t know exactly how long it will run. You know it has a lower bound (maybe you know the program has a component that takes n units of time so you know the entire process needs at least n units of time even if nothing else runs before or after. You can run the task at */n * * * * which means every nth minute every hour of every day of every month of every year. What is your best option for n? Should this n be as close to the lowest value? Should this n be as close to the highest acceptable value? Should the n be a prime? Now, lets say you want to sample the process and your sampler runs every thirty seconds. We would want to be “out of sync” with the process we want to test so we get a “snapshot” at different times of the process.

Advertisements