jamesrwhite / minicron

🕰️ Monitor your cron jobs
GNU General Public License v3.0
2.34k stars 154 forks source link

Can't edit job command. Only name and user. #120

Closed Huron closed 8 years ago

Huron commented 9 years ago

image

jamesrwhite commented 9 years ago

This is actually by design, the way jobs are stored does not allow the command to be edited because a hash of the command/host is used to identify the job.

jamesrwhite commented 9 years ago

Going to re-open this to serve as a reminder for something to investigate if it can be achieved in future versions.

jamesrwhite commented 9 years ago

Moment of inspiration, this is possible after all!

jamesrwhite commented 8 years ago

So https://github.com/jamesrwhite/minicron/commit/30f6db168739d6dbdb28be4b8ef26726f53ade0d makes this possible now with the caveat that this is a permanent change to the job so for example when you go back and look at an old execution it will be confusing now as it is tied to the latest copy of the job.

e.g

job 1 command = "echo 1"
job 1 execution 1 output = "1"
update job 1 command to = "echo 2"
go back and view job execution 1 and it now says the command is "echo 2" even though the output remains as "1"

I can think of a few different ways to handle this: