Git Product home page Git Product logo

cronwrap's People

Contributors

desktable avatar imankulov avatar lowks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cronwrap's Issues

Enhancement: Show local time instead of UTC

The time used in the cronwrap email is UTC. My time-zone is UTC+12 and now +13 because of daylight savings.

It is confusing and error-prone having to derive the local time from UTC. So I suggest to use the local time instead of the UTC time when adding the time to the email.

I don't see a button to attach a patch, so I included it as text below.

/usr/local/bin# diff cronwrap cronwrap2
123c123
<     result_str.append('%s UTC\n' % (datetime.utcnow() - timedelta(seconds=int(cmd.run_time))))

---
>     result_str.append('%s\n' % (datetime.now() - timedelta(seconds=int(cmd.run_time))))
126c126
<     result_str.append('%s UTC\n' % datetime.utcnow())

---
>     result_str.append('%s\n' % datetime.now())

Update to Python 3?

I remember using this earlier and thought I would use it again, but it requires Python 2 due to its print statements not using parenthesis. Would you consider releasing a new version that is runnable on non-deprecated versions of Python?

I could of course update the script and submit a PR.


Edit: turns out someone already did the work.

cronwrap extension/fork with Python email and strict command timeout (croncoat); How to proceed and give credit?

Hi,
I have started using cronwrap a couple of months ago and really liked it. I wanted to have more freedom with the from address of the emails I send out, so I began modifying it a bit. I added additional command line parameters for this and also allowed killing of commands that exceeded their deadline. At that point, this was still supposed to be a pull request.

I then ran into some issues with that because mail doesn't work with the same parameters on all my systems. I hadn't thought of that when I started out. I subsequently switched the mail backend over to the email / smtp library that comes with Python. From there, I realized re-integration with cronwrap would be difficult. I have thus re-branded the project to croncoat and shared it again under the same BSD license. I hope this is fine with everyone here and in line with the open source spirit.

I am also writing here to request some help with the attribution. I could only find "2010 by Plurk" in the script files. Please reply here and/or contact me if you want your name added to a license file. If you consider the differences I list in the readme unfair or if you find bugs, let me know as well.

Kind regards,
Matthias Kauer

[edit] I suppose the code that kills commands after they timed out could be re-integrated with cronwrap if anyone is interested in that.

Does timeout actually work?

If I'm reading the code right, timeout is implemented by waiting for the command to complete (as os.system blocks), and only then sending a mail about the timeout.

This doesn't really handle stalled processes right, does it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.