8 opendir(DIR, $config{'at_dir'});
9 while($f = readdir(DIR)) {
10 local $p = "$config{'at_dir'}/$f";
11 if ($f =~ /^(\d+)\.a(\S+)$/) {
13 local $job = { 'id' => $f,
15 'user' => scalar(getpwuid($st[4])),
16 'created' => $st[9] };
22 $job->{'realcmd'} = $job->{'cmd'};
23 $job->{'realcmd'} =~ s/^[\000-\177]+#ident.*\ncd\s+\S+\nulimit\s+\S+\numask\s+\S+\n//;
31 # create_atjob(user, time, commands, directory)
34 local @tm = localtime($_[1]);
35 local $date = strftime "%H:%M %b %d", @tm;
36 &open_execute_command(AT, "su \"$_[0]\" -c \"cd $_[3] ; at $date\"", 0);
39 &additional_log('exec', undef, "su \"$_[0]\" -c \"cd $_[3] ; at $date\"");
45 &system_logged("at -r \"$_[0]\"");