File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,19 @@ function getKernelExtensions {
6060}
6161
6262function getCronjobs {
63- crontab -l 2> /dev/null | grep -v ' ^#' | cut -d ' ' -f 6
63+ while IFS= read -r cron; do
64+ if [ -z " $cron " ]; then
65+ continue
66+ fi
67+
68+ if echo " $cron " | cut -d ' ' -f 1 | grep -q ' @' ; then
69+ # @reboot notation
70+ echo " $cron " | cut -d ' ' -f 2
71+ else
72+ # * * * * * notation
73+ echo " $cron " | cut -d ' ' -f 6
74+ fi
75+ done <<< " $(crontab -l 2>/dev/null | grep -v '^#' | grep -vE '^\n')"
6476}
6577
6678function listCronJobs {
@@ -76,7 +88,7 @@ function listCronJobs {
7688 echo -e " Type : cronjob"
7789 echo -e " User : $( whoami) "
7890 echo -e " Launch: ${ORANGE} enabled${NC} "
79- echo " File : n/a "
91+ echo " File : ${name} "
8092 done
8193}
8294
You can’t perform that action at this time.
0 commit comments