What does "trap: SIGINT: bad trap" mean and how do I fix it?
-1
votes
1
answer
1612
views
I moved code to a new virtual server running Ubuntu 22.
I have the following (edited to make names shorter) in my crontab so that it runs **myCommand** only if it is not already running:
*/1 * * * * cusack flock -x -n ~myLock myCommand >> ~my.log 2>&1
When it runs, it puts : SIGINT: bad trap
in my logfile. It did not do this on the old server. Am I doing something wrong?
My goal is, as alluded to above, to just have one copy of myCommand running at a time. If it is still running from the last time, it should do nothing. Other posts led me to believe that this was a proper way to do this, and it worked on my old server. So why does it give me this error message?
I tried adding a "-E 0" thinking that a 0 might mean everything is OK as it does in some contexts, but that didn't work. I added "-x", which didn't work and shouldn't change anything since according to the documentation it is the default anyway.
Asked by ferzle
(3 rep)
May 29, 2024, 09:17 PM
Last activity: May 30, 2024, 07:55 PM
Last activity: May 30, 2024, 07:55 PM