Since cron is “stateless”, it cannot express “frequencies” exactly, but only “patterns” that it (apparently) constantly matches the current time.
To paraphrase my question, it becomes more obvious: "Is it possible to run a cronjob at 00:01 in the morning every night, except for the passes when it ran for 2 nights?" When cron compares the current time with the job request time patterns, cron cannot know if it has done its job in the past.
(You may be able to write cron with a state that records past jobs and thus includes templates for matching this state, but this is not the standard cron included in most operating systems. Such a system will be complicated, requiring the introduction of the concept of when such patterns are “reset.” For example, is the reset pattern when the time changes (ie, the crontab entry is being revised)? Look at your favorite calendar application to see how difficult it can be expressed Repeating patterns of planned events and images Please note that they do not have a problem with reset, because the start calendar event has a natural date “start” a / k / a “reset.” Try rescheduling a recurring calendar event every week for a week delay, for example, Christmas. you need to stop this recurring event and restart a brand new one, which illustrates the limited expressiveness of how even complex calendar applications present repeating patterns. And, of course, hav calendars have many states - each individual event can be deleted or rescheduled independently [in most calendar applications]).
In addition, you will probably want to do your work every third night if successful, but if the latter failed, try again immediately, perhaps the next night (do not wait another 3 days) or even earlier than an hour later (but stop try again on morning arrival). It is clear that cron could not know if your work was successful, and the template also could not express an alternative more frequent “repeat” chart.
ANYWAY-- You can do what you want. Write a script, tell cron to run it at night at 00:01. This script can check the timestamp of something * that records the "last run", and if it was> 3 days ago **, run the task and reset the time stamp of the "last run".
(* this timestamped indicator is a slightly persistent state that you can manipulate and check, but which cron cannot)
** Be careful with time arithmetic if you use a human-readable clock time - twice a year, on some days - 23 or 25 hours a day, and 02: 00-02: 59 occurs twice in one day or not at all. Use UTC to avoid this.