Salut à tous,
Je viens de terminer une contrib permettant de gérer les entrés dans le cron.
Cette contrib ajoute un nouveau panneau dans le server-manager qui permettra d'ajouter/modifier ou effacer un entrée de la crontab.
Dispo ici
A+
Modérateur: modos Ixus
Create or Modify a crontab entry
minutes:
'0' is the first minute, ie 2.00 as opposed to '1' being 2.01
NOTE: you MUST choose a minute here if you do not want the cron to run EVERY MINUTE!
[15__________]
choose every minute
[NO_]
hours:
'0' is midnight, ie 12.00 am as opposed to '1' being 1.00 am '22' is 10pm
[Every hour]
choose every hour
[NO_]
day:
Choose whether you want the cron to run every day, every x days or the xth day of the month. As well
as choosing a value here,
you can choose a day of the week in the field further down and it will run on both that day and the
days you select here.
[Every day]
choose every day
[NO_]
This panel simply permit to add modify or delete crontab task
Add a new crontab
Minutes Every minute Hours Every hour Day Every day Month Day of the week Command
0 NO 13 NO * Every month Every day of week ls /root > /tmp/test_cron Change Delete
15 NO 14 NO * Every month Every day of week /bin/ls /root > /tmp/ls_root Change Delete
You don't have permission to access /server-manager/cgi-bin/ on this server.
[root@srv75 contribs]# rpm -Uvh sme-crontab_manager-0.1-2.noarch.rpm
Preparing... ########################################### [100%]
1:sme-crontab_manager ########################################### [100%]
/var/tmp/rpm-tmp.75761: /sbin/e-msith/expand-template: No such file or directory
error: execution of %preun scriptlet from sme-crontab_manager-0.1-1 failed, exit
status 127
[root@srv75 contribs]# rpm -e sme-crontab_manager
error: "sme-crontab_manager" specifies multiple packages
[root@srv75 contribs]# rpm -qa | grep sme-crontab
sme-crontab_manager-0.1-2
sme-crontab_manager-0.1-1
[root@srv75 contribs]# rpm -e sme-crontab_manager-0.1-1
/var/tmp/rpm-tmp.97722: /sbin/e-msith/expand-template: No such file or directory
error: execution of %preun scriptlet from sme-crontab_manager-0.1-1 failed, exit status 127
[root@srv75 contribs]# rpm -e sme-crontab_manager-0.1-2
/var/tmp/rpm-tmp.22328: /sbin/e-msith/expand-template: No such file or directory
error: execution of %preun scriptlet from sme-crontab_manager-0.1-2 failed, exit status 127
[root@srv75 contribs]# rpm -qa | grep sme-crontab
sme-crontab_manager-0.1-2
sme-crontab_manager-0.1-1
Add a new crontab
Minutes Every minute Hours Every hour Day Every day Month Day of the week Command
3 NO 0 NO 2 NO Every month Every day of week /bin/ls Change Delete
/sbin/e-smith/expand-template /etc/crontab
service crond restart
[root@srv75 contribs]# rpm -e sme-crontab_manager-0.1*
error: package sme-crontab_manager-0.1-1.noarch.rpm is not installed
error: package sme-crontab_manager-0.1-2.noarch.rpm is not installed
[root@srv75 contribs]# rpm -qa | grep sme-crontab_manager
sme-crontab_manager-0.1-2
sme-crontab_manager-0.1-2
sme-crontab_manager-0.1-1
sme-crontab_manager-0.1-2
rpm -e --allmatch sme-crontab_manager-0.1*
rpm -e --allmatches sme-crontab_manager-0.1.1
rpm -e --allmatches sme-crontab_manager-0.1.2
qui empêchait la désinstall. Avec un petit ln -s bien placé, la désinstallation se passe sans pb./var/tmp/rpm-tmp.29303: /sbin/e-msith/expand-template: No such file or directory
error: execution of %preun scriptlet from sme-crontab_manager-0.1-2 failed, exit status 127
35 15 18 10 * root /bin/ls /root > /tmp/ls_root
#------------------------------------------------------------
# TEMPLATE END
#------------------------------------------------------------
[root@srv75 contribs]# ls -lrt /tmp | tail -1
-rw-r--r-- 1 root root 261 Oct 18 15:35 ls_root
Retour vers E-Smith / SME Server
Utilisateur(s) parcourant actuellement ce forum : Aucun utilisateur inscrit et 1 invité