For managing fortunes cookies and rather for frequently adding new fortunes to the distributed files Joey needs some help. Since it would not be a good idea to add 50 cookies at once, since new cookies are distributed via mail and HTTP, he usually maintains some private source files from which a couple of fortune cookies get copied once or twice a day.
This task is quite boring and can be automated. In fact, when Joey is not around at the proper time or has a too high load, no new fortune cookies could be added to the official files. Hence, in 2005 he developed two small utilities that help him maintain a constant flow of new fortune cookies.
fortunes-move
This program moves n (default: 1) fortune cookies from the top of the specified file to the destination file, randomises it and recreates the source file. This program needs to be called frequently to add new fodder to the distributed fortune files.
fortunes-runq
This program is called via cron and acts as a frontend to the program above. It takes different parameters than the above like "infodrom 3" which means to take 3 cookies from the infodrom source file to the infodrom destination file. This way, one call will maintain all fortune queues and destination files.