I have other scripts that I run when I get around to it, that take care of the tasks I'm reminded of via the flag. For example, I have a script file that runs system maintenance tasks (system-maint.sh). One of the first things those script files do is rm that flag, so I know I've taken care of it for the week/month/whatever.
All working well, except in this circumstance:
1. Crontab set to run at 8pm every day.
2. Crontab runs, and sets the reminder flag if it's appropriate to that machine.
3. When I later run the associated maintenance script, though, two things can happen:
If I run the maintenance script, say, next day, no problem. Script removes flag and runs tasks.
However, if I run the maintenance script, say, at 8:50pm -- which is looooonnggg after that little task of checking the dow and then creating a tiny text file on the desktop --- the maintenance script removes the flag, and completes the tasks... but then the flag text file just reappears back on the desktop a few minutes later.
If I remove the flag text file by hand during same time frame, it still comes back.
What is happening that's recreating that text file or continuing to run the crontab tasks or...? Is there a time range, for example, that crontab continues to run within, even when I've given it a specific time to run.
Here's my crontab setup:
Code: Select all
# m h dom mon dow command
* 20 * * * /home/grackle/Bin/tasks-daily.sh