Skip to content

Improvements in the handling of crontab comments

Improvements in the handling of crontab comments include appending all commented lines above a cron expression and discarding previous ones if there is an enter.

Works situations

#- - - * randomtext abc
#5 * * * *       /home/ubuntu/teste.sh


#- - - * randomtext abc
5 * * * *       /home/ubuntu/teste.sh
#- - - * randomtext abc
#5 * * * *       /home/ubuntu/teste.sh
#- - - * randomtext abc
#5 * * * *       /home/ubuntu/teste.sh

#- - - * randomtext abc
5 * * * *       /home/ubuntu/teste.sh
# another comment
#- - - * randomtext abc
5 * * * *       /home/ubuntu/teste.sh

Before:

header header
sk4 sk5

After

header header
sk6 sk7

Another example

#- - - * randomtext abc
#5 * * * *       /home/ubuntu/teste.sh
#- - - * randomtext abc
5 * * * *       /home/ubuntu/teste.sh

#teste abc
#\  * * *       /home/ubuntu/kde/src/kcron/Messages.sh
#testes comentários
10 * * * *       /home/ubuntu/kde/src/kcron/Messages.sh

image

BUG: 432679

Edited by Cássio Sousa

Merge request reports

Loading