Unix/Linux OS/Swapping crontab
I have one requirement where I need to stop few jobs from running during maintenance window, and then reschedule them again after maintenance is complete. This is done generally every other week.
Currently I just comment out the jobs which are to be stopped in crontab, and then uncomment them when maintenance is complete.
Is there any way we can create 2 files for the jobs in crontab, 1 with normal schedule and other considering maintenance window, and then swap them as and when needed?
Sorry for late response, health problems...
Anyway, the command "crontab" can take as an argument a file to install, so yes, you could have two separate files, nicely maintained and switching them around. See man pages for "crontab".