Shutdown host system ?
Re: Shutdown host system ?
Why now the different time?
Re: Shutdown host system ?
got it i think
I can make sh script with
and put that in crontab, will tet it latter
to replay to you:
It is just a test enter. i would change it later to
10 0 * * *
I can make sh script with
Code: Select all
#!/bin/bash
echo my_awesome_password | sudo -S python awesome_script.py
to replay to you:
It is just a test enter. i would change it later to
10 0 * * *
Re: Shutdown host system ?
Can you post the contents of the scripts?
Does
sudo crontab -e
0 * * * * shutdown -h
work?
Does
sudo crontab -e
0 * * * * shutdown -h
work?
Re: Shutdown host system ?
will check that and clean out code,
there are some leftovers there.
will check in tomorow, gotta run now.
thanks!
there are some leftovers there.
will check in tomorow, gotta run now.
thanks!
Re: Shutdown host system ?
this is first run, i rebooted system after this
- don't know is it important
- don't know is it important
Code: Select all
Oct 22 22:17:01 Xbmc CRON[6012]: (root) CMD ( cd / && run-parts --report /etc/ cron.hourly)
Oct 22 23:00:01 Xbmc CRON[7507]: (root) CMD (shutdown -h)
Oct 22 23:00:01 Xbmc CRON[7506]: (CRON) error (grandchild #7507 failed with exit status 127)
Oct 22 23:00:01 Xbmc CRON[7506]: (root) MAIL (mailed 1 byte of output; but got s tatus 0x004b, #012)
Oct 22 23:04:08 Xbmc cron[992]: (CRON) INFO (pidfile fd = 3)
Oct 22 23:04:08 Xbmc cron[1022]: (CRON) STARTUP (fork ok)
Oct 22 23:04:08 Xbmc cron[1022]: (CRON) INFO (Running @reboot jobs)
Re: Shutdown host system ?
This is getting very non-SABnzbd. Probably better to ask in a more specialized forum.
Re: Shutdown host system ?
sander thank you for all your help,
I'll do some more testing today, if script is going to work via sh script it is ok with me.
Regards, Sinisa
I'll do some more testing today, if script is going to work via sh script it is ok with me.
Regards, Sinisa
[solved] Shutdown host system ?
Ok just for reference if somebody needs this.
This definitely works, calling py script with this sh script is solution.
Sander, thank you for all your help
This definitely works, calling py script with this sh script is solution.
Code: Select all
#!/bin/bash
echo my_awesome_password | sudo -S python awesome_script.py