oriolrius.cat

Des del 2000 compartiendo sobre…

Tag: cron

Notes sobre Munin i Crontab, problemes amb locales

Reading time: 1 – 2 minutes

muninResum de notes interessants que acabo de descobrir sobre: munin, crontab i locales. Tot plegat corrent amb Ubuntu.

  • crontab, té diversos fitxers de configuració a /etc/cron.d la sintaxis d’aquests és la mateixa que /etc/crontab
  • els fitxers que hi ha a /etc/cron.d sovint pertanyen a serveis que necessiten executar ordres periódicament
  • al llençar munin des de dintre d’aquest directori es generaben correus d’error del crontab, queixant-se de problemes amb les locales
  • dins el fitxer /etc/cron.d/munin podem declarar les locales i així no se’ns tornarà a donar el problema
  • si volem sobrecarregar on s’han d’enviar els correu d’error de cron en un dels fitxers que hi ha /etc/cron.d podem declarar la variable MAILTO=user@domain.tld dins el propi fitxer

PHPClasses: VirtualCron, GoogleMaps i InsertFTP

Reading time: 2 – 2 minutes

A través de PHPClasses he trobat aquestes tres classes de PHP que tenen bona pinta així que espero que algún dia li facin servei a algú o a mi mateix:

  • Insert FTP: This class can be used to manage FTP user accounts stored in a MySQL database.It can connect to a MySQL server that has a database of FTP user accounts used by FTP servers like pure-ftpd. It can: add new user accounts, block an user, change account quotas, retrieve the details of an FTP user account.
  • Karatag Google Maps HTTP Request: The Google Maps API is mostly known for being able to present maps of anywhere in the world in any Web site. However, Google Maps API is also able to provide other interesting features, like determining the geographic coordinates of a given address. This class uses the Google Maps API just for the purpose of determining the location associated to an address from PHP programs.
  • Virtual Cron: Many Web applications need to execute periodical tasks, like sending newsletters, processing pending e-commerce orders, etc. Some operating systems come with programs, like cron or at, to execute scheduled tasks. However, under some Web hosting environments these programs cannot be used. This class provides an alternative solution that can be used in more restricted hosting environments. It uses files to keep track of the last time when a periodical task was executed. The site Web page scripts can use the class to check these files. The class can tell when it is time to execute a task again. When it is time, the same script can execute the scheduled task without depending on external programs.