@reboot for User cronjobs (SKINS)

Version 1.48.1

Feature
Finished

Users can now specify the @reboot option for cronjobs. A new checkbox will be displayed at the top right of the "Add new cron" table. When checked, the time input fields will be hidden, leaving only the Command. Edit can be used to edit the command, but cannot switch between @reboot and time types. If you need to chagne @reboot to cron times, then delete the whole cron and create a new one. SKINS: user/cronjobs.html 1) new javascript function: function set_cron_display() { var set_display = ''; if (document.getElementById('reboot').checked) { var set_display = 'none'; } document.getElementById('minute_tr').style.display = set_display; document.getElementById('hour_tr').style.display = set_display; document.getElementById('day_of_month_tr').style.display = set_display; document.getElementById('month_tr').style.display = set_display; document.getElementById('day_of_week_tr').style.display = set_display; } 2) The <tr> values for the cron times need t have the above respective IDs, eg: <tr id='minute_tr'> <tr id='hour_tr'> <tr id='day_of_month_tr'> <tr id='month_tr'> <tr id='day_of_week_tr'> 3) Checkbox added to the td in a span: <tr><td class=listtitle colspan=3>Create a New Cron Job <span style='float: right'><input type=checkbox id='reboot' name='reboot' value='yes' onchange="set_cron_display();"> Run on @reboot</span></td></tr>

Interested to try DirectAdmin? Get a 30-day Free Trial!