Closed surjikal closed 8 years ago
You can run a job manaully from the server itself like so:
minicron run --verbose '/path/to/your/job --some-option'
You can also use the --dry-run
option to check the job actually runs correctly without sending it to the minicron server.
..or did you mean from the web UI itself?
Yeah I meant from the web UI :)
On Tue, Sep 16, 2014 at 7:20 AM, James White notifications@github.com wrote:
You can run a job manaully from the server itself like so:
minicron run --verbose '/path/to/your/job --some-option'
You can also use the --dry-run option to check the job actually runs correctly without sending it to the minicron server.
..or did you mean from the web UI itself?
— Reply to this email directly or view it on GitHub https://github.com/jamesrwhite/minicron/issues/107#issuecomment-55749570 .
Cool, I don't think this should be that hard to do. Just need to find some time to get around to it :)
+1 on run a job manually, from web UI (like at or batch )
+1 on run a job manually, from web UI
@jamesrwhite hey, is there any chance that someday you will find some time to fix this issue? :)
It's not really fixing an issue, it's a whole new feature!
minicron relies on cron to trigger it, as such being able to trigger jobs manually requires quite a different approach. Potentially to run a job manually I could add a one off entry to the crontab for a specific time and somehow tidy that up after but that seems like a hack.
The proper way I believe would be to have a minicron "agent" running on each of the remote hosts that sits and listens for commands to execute. There are obvious security concerns with this but provided, as recommended, minicron is not running on the public internet it might be ok.
Given the amount of work required to do this though and the relatively small benefit feature wise it's quite far down on my priority list if I'm being honest. I do want to eventually get to it though, I can't commit to any kind of ETA though :)
If anyone wants to pick this up and give it a go though, feel free! I'll do my best to help.
Why you want to do this in so complicated way? You have a SSH connection with root user (in most cases) - just run su USERNAME -c "minicron run CMD >/dev/null 2>&1 </dev/null &"
Ha, I knew there was another way I'd thought about before. I wrote that reply late at night, wasn't quite thinking straight!
The only concern I had with doing it this way was that some jobs might take minutes/hours and I didn't want it to hold the connection open for that long.. but just like you've done there you could just run it in the background. On Wed, 11 Nov 2015 at 05:43, Andrey Yantsen notifications@github.com wrote:
Why you want to do this in so complicated way? You have a SSH connection with root user (in most cases) - just run su USERNAME -c "minicron run CMD >/dev/null 2>&1 </dev/null &"
— Reply to this email directly or view it on GitHub https://github.com/jamesrwhite/minicron/issues/107#issuecomment-155672800 .
I was trying to debug a job and that feature would have been really useful!