#!/usr/bin/perl
print "Conent-type: text/plain\n\n";
# check old cron jobs
print qq/crontab -l/;
# set new cron job where foo.cron has the crontab info
print qq/crontab -e foo.cron/;
What I've tried doesn't seem to be working... but then again perhaps the hosting account I'm testing on doesn't allow access to cron. Not sure.
Also, see the Set::Crontab module from CPAN.
What I would do is "crontab -l" to get the crontab, then add my line, then put it back into crontab with no "-e" and a filename.
Try this stuff from the command line so that you see how it works before you erase your crontab through a webpage.