Thread Backup von Dateien als Cronjob
(6 answers)
Opened by cbxk1xg at 2008-11-07 15:44 Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/usr/bin/perl use strict; use warnings; use DateTime; use constant SECONDS_PER_DAY => 24 * 60 * 60; my $filename = "20080112BlaFasel.xys"; my ($year,$month,$day) = $filename =~ /(\d{4})(\d\d)(\d\d)/; my $diff = DateTime->new( year => $year, month => $month, day => $day ) ->subtract_datetime_absolute( DateTime->now ); print $diff->seconds / SECONDS_PER_DAY; OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/) -- Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html Perl-Entwicklung: http://perl-services.de/ |