making a crontab entry through perl code

  • akaash
  • Beginner
  • Beginner
  • akaash
  • Posts: 62
  • Loc: Gujurat,India

Post 3+ Months Ago

i want to make an entry like 1 * * * * /var/www/cgi-bin/ x y z in system crontab through code.

where x,y,z are the argument passed to the script

what will be perl code for doing this thing?
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5731
  • Loc: Sub-level 28

Post 3+ Months Ago

If you're sending parameters to the perl script, your best bet would be having the cron call a shell script, then use the shell script to call perl with the parameters - I just ran across somebody having a similar problem attempting to call a PHP script through cron. After sticking it in a shell script, the PHP script could receive parameters via that, and all worked no problem.

I'm not entirely sure off-hand how you'd catch those parameters in the perl script though.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 43 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.