Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quiet mode for execution from cron #376

Closed
muelli opened this issue Sep 11, 2019 · 4 comments
Closed

quiet mode for execution from cron #376

muelli opened this issue Sep 11, 2019 · 4 comments
Milestone

Comments

@muelli
Copy link

@muelli muelli commented Sep 11, 2019

I want to run sigal regularly through a cron job.
Currently Sigal prints its status regardless, e.g.

Collecting albums, done.
  Sorting albums  [####################################]  100%
   Sorting media  [####################################]  100%
Collecting files  [####################################]  100%         
Processing files  [------------------------------------]  0/0
   Writing files  [####################################]  100%         

Done.
Processed 0 images (64 skipped) and 0 videos in 0.56 seconds.

To minimise the email I receive I would appreciate a quiet mode which only prints when the program faced a serious problem.

saimn added a commit that referenced this issue Oct 4, 2019
@saimn
Copy link
Owner

@saimn saimn commented Oct 4, 2019

It seems a sensible idea, so I implemented this. I only left the "Done, processed ..." message since I think that it can be useful to have it in any case, but I could be convinced that it is better to print nothing. What do you think?

@muelli
Copy link
Author

@muelli muelli commented Oct 4, 2019

cool. thanks :)
My thinking is that if the command does not print anything then it is happy, "no news is good news".
And the less I will have to pipe things through grep to filter out strings to happier I will be.
Right now, cron generates an email when the process has printed something. If the process did not print anything, then cron does not send email. And I prefer it to not send email ;-)

@saimn
Copy link
Owner

@saimn saimn commented Oct 5, 2019

Ok, let's go for the completely quiet version :)

@saimn saimn closed this Oct 5, 2019
@saimn saimn added this to the 2.1 milestone Oct 5, 2019
@153957
Copy link

@153957 153957 commented Dec 2, 2019

@muelli hint: use something like cronic to only send cron emails when the statuscode of the command is an error, then you do not need the command to be quiet, so that when things go wrong you get more output, for easier debugging..

kontza pushed a commit to kontza/sigal that referenced this issue Aug 28, 2020
kontza pushed a commit to kontza/sigal that referenced this issue Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants