I don't think there is advantage over systemd, it's just a different way to do that.
Probably systemd brings some new features but I used to use crond, so...
by JB314 » 23 Feb 2015, 10:44
by SlF » 07 Jan 2016, 20:13
JB314 wrote:Here is another version of the Alarm Clock feature, tested on tablet and normally well "bootstraped".RuneAudio-Wakeup.png
You can download the necessary files here :RuneAudio-Wakeup.tar.gz
It contains these following new or modified files :/var/www/assets/js/runeui.js : add clockpicker and touchspin initialisation
/var/www/assets/js/runeui.min.js : same but minified
/var/www/assets/js/vendor/jquery.clockpicker.min.js : new clockpicker component
/var/www/assets/js/vendor/jquery.bootstrap-touchspin.min.js : new touchspin component (+ and - for number input)
/var/www/assets/css/jquery.clockpicker.min.css
/var/www/assets/css/jquery.bootstrap-touchspin.min.css
/var/www/command/play : script used for starting properly a playlist through cron
/var/www/command/stop : stop playback through cron
/var/www/app/wakeup_ctl.php : new controler for handling whole AlarmClock process
/var/www/app/templates/wakeup.php : template
/var/www/app/templates/header.php : add .css link
/var/www/app/templates/footer.php : add .js components
[Edit 23.02.2015] : I just thought I forgot to add a file...
in addition you have to modify the file /var/www/index.php to add a new item in the $controllers array :
- Code: Select all
$controllers = array(
'credits',
'coverart',
...
'sources',
'tun',
'wakeup' // <- this line
);
In order to have it working, be careful you specified a correct timezone in RuneAudio Settings.
Then connect to SSH and start the cron service (it should be already installed):
- Code: Select all
systemctl enable cronie
systemctl start cronie
If you don't reboot, you may have to restart the php-fpm service in order to see the new pages :
- Code: Select all
systemctl restart php-fpm
Feel free to comment and adapt!
JB314
by JB314 » 08 Jan 2016, 10:07
by SlF » 11 Jan 2016, 13:51
by Pilou007 » 28 Jan 2016, 15:41
SlF wrote:JB314 wrote:Here is another version of the Alarm Clock feature, tested on tablet and normally well "bootstraped".RuneAudio-Wakeup.png
You can download the necessary files here :RuneAudio-Wakeup.tar.gz
It contains these following new or modified files :/var/www/assets/js/runeui.js : add clockpicker and touchspin initialisation
/var/www/assets/js/runeui.min.js : same but minified
/var/www/assets/js/vendor/jquery.clockpicker.min.js : new clockpicker component
/var/www/assets/js/vendor/jquery.bootstrap-touchspin.min.js : new touchspin component (+ and - for number input)
/var/www/assets/css/jquery.clockpicker.min.css
/var/www/assets/css/jquery.bootstrap-touchspin.min.css
/var/www/command/play : script used for starting properly a playlist through cron
/var/www/command/stop : stop playback through cron
/var/www/app/wakeup_ctl.php : new controler for handling whole AlarmClock process
/var/www/app/templates/wakeup.php : template
/var/www/app/templates/header.php : add .css link
/var/www/app/templates/footer.php : add .js components
[Edit 23.02.2015] : I just thought I forgot to add a file...
in addition you have to modify the file /var/www/index.php to add a new item in the $controllers array :
- Code: Select all
$controllers = array(
'credits',
'coverart',
...
'sources',
'tun',
'wakeup' // <- this line
);
In order to have it working, be careful you specified a correct timezone in RuneAudio Settings.
Then connect to SSH and start the cron service (it should be already installed):
- Code: Select all
systemctl enable cronie
systemctl start cronie
If you don't reboot, you may have to restart the php-fpm service in order to see the new pages :
- Code: Select all
systemctl restart php-fpm
Feel free to comment and adapt!
JB314
Nicely done! I applied your addon, but it isn't working The webpage and menu item are working, but my alarms are not working. I applied an alarm for 20:10 at 20:09 and there was no alarm. cronie is up and running and the timezone is correct. I checked with "date" via ssh and it shows the correct time.
Any ideas?
by SlF » 31 Jan 2016, 12:25
by SlF » 02 Feb 2016, 16:42
<div class="container">
<h1>Sleep Timer</h1>
<form class="form-horizontal" action="" method="post" role="form">
<fieldset>
<legend>Sleep Timer Status</legend>
<div class="form-group" >
<label for="enable" class="col-sm-2 control-label">Enable</label>
<div class="col-sm-10">
<label class="switch-light well" onclick="">
<input name="sleeptimer[enable]" type="checkbox" value="1"<?php if($this->enabled == 1): ?> checked="checked" <?php endif ?>>
<span><span>OFF</span><span>ON</span></span><a class="btn btn-primary"></a>
</label>
<span class="help-block">Enable or disable sleep timer.</span>
</div>
</div>
</fieldset>
<fieldset>
<legend>Set time</legend>
<div class="form-group">
<div class="col-md-2 col-md-offset-0 col-sm-7 col-sm-offset-1 col-xs-12">Time</div>
<div class="clearfix visible-xs-block"> </div>
</div>
<div class="form-group form-actions">
<div class="col-sm-offset-2 col-sm-10">
<button class="btn btn-primary btn-lg" value="save" name="save" type="submit">Apply</button>
<span class="help-block">Save.<br>
Don't forget to apply your changes.
</span>
</div>
</div>
</fieldset>
</form>
</div>
by Pilou007 » 07 Feb 2016, 19:44
SlF wrote:You are lucky ... in the web UI nothing appears in the menu ...
What Can I do?
________________________
Did you reboot or at least restarted php? Did you copy ALL the file? Did you edit the array list? The array list is important to give you "Alarm Clock" in the upper right menu.
by SlF » 10 Feb 2016, 12:44
Pilou007 wrote:
Hi Sif
I reboot the po and restart php, I copy all the files listed I modify the file $controllers array as mention.
What do you mean by array list?
Best regards
by Pilou007 » 16 Feb 2016, 16:39
support RuneAudio