1

So here's the situation:

  • I start a program @reboot with Cron (OS is Debian 11).
  • This program keeps performing tasks unless it encounters an illegal state.
  • I change the CLI variables for this program with crontab -e.
  • Cron responds that it installed the new crontab successfully.

What is the expected behavior of Cron supposed to be?

  1. It stopped the running program and started a new one.
  2. It starts the program again and leaves the older one running.
  3. It does nothing and starts the program with the new CLI variables on the next OS reboot.

Three describes the behavior I expect, since it's supposed to start the program only on reboot. But I can't find any implementation rules for this online.

1 Answer 1

4

@reboot : Run once after reboot.

So, for your particular use case 3.

A systemd service may be a better way to go with a long running process though.

4
  • Do you have any source for this, or is this based on experience? Sep 8, 2022 at 14:08
  • man 5 crontab documents the meaning of different options. Sep 8, 2022 at 15:27
  • My quote is from the man page referred to in Tero's comment.
    – user9517
    Sep 9, 2022 at 6:31
  • Alright; thanks for the answer! Sep 9, 2022 at 7:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .