cron can be used to schedule running a program once in a while. But it seems to be not specific to an existing shell process.
If I have a script which accesses the state of a specific bash process (e.g. to access the output of running
dirs in the shell by
source the script), how can I schedule its running in the specific bash process once in a while?
update: neither reply actually can directly access the state of an existing bash process. They can indirectly for some state information copied from the parent shell process to the child shell process. I don't remember why I accepted one.