6 opendir(DIR, $config{'at_dir'});
7 while($f = readdir(DIR)) {
8 local $p = "$config{'at_dir'}/$f";
9 if ($f =~ /^a(\S+)\.(\d+)$/) {
11 local $job = { 'id' => $f,
13 'user' => scalar(getpwuid($st[4])),
14 'created' => $st[9] };
20 $job->{'realcmd'} = $job->{'cmd'};
21 $job->{'realcmd'} =~ s/^[\000-\177]+cd\s+(\S+)\n//;
29 # create_atjob(user, time, commands, directory, send-email)
32 local @tm = localtime($_[1]);
33 local $date = sprintf "%2.2d:%2.2d %d.%d.%d",
34 $tm[2], $tm[1], $tm[3], $tm[4]+1, $tm[5]+1900;
35 local $mailflag = $_[4] ? "-m" : "";
36 &open_execute_command(AT, "su \"$_[0]\" -c \"cd $_[3] ; at $mailflag $date\" >/dev/null 2>&1", 0);
39 &additional_log('exec', undef, "su \"$_[0]\" -c \"cd $_[3] ; at $mailflag $date\"");
45 &system_logged("atrm \"$_[0]\" >/dev/null 2>&1");