#!/usr/local/bin/perl # edit_cron.cgi # Edit an existing or new cron job require './cron-lib.pl'; &ReadParse(); @jobs = &list_cron_jobs(); if (!$in{'new'}) { $job = $jobs[$in{'idx'}]; &can_edit_user(\%access, $job->{'user'}) || &error($text{'edit_ecannot'}); &ui_print_header(undef, $text{'edit_title'}, ""); } else { &ui_print_header(undef, $text{'create_title'}, ""); if (defined($in{'clone'})) { # Default to clone source $clone = $jobs[$in{'clone'}]; $job = { %$clone }; } elsif ($config{'vixie_cron'}) { # Default to hourly, using @ format $job = { 'special' => 'hourly', 'active' => 1 }; } else { # Default to hourly, using standard notation $job = { 'mins' => '0', 'hours' => '*', 'days' => '*', 'months' => '*', 'weekdays' => '*', 'active' => 1 }; } } print "
\n"; } &ui_print_footer("", $text{'index_return'});