Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I get things set up as a cron job?

cron Job
0
Posted

How do I get things set up as a cron job?

0

Cron runs under a restricted environment, where it basically runs /bin/sh, and doesn’t process any .profile files. This means that your environment variables will not be set, such as your PATH. What people usually do is put their commands in an sh script that “sources” their profile and then executes the command, like so: . /etc/profile . /home/username/.profile /path/to/command/thecommand If you want to set the NEWSCLIPPER environment variable (for specifying a global configuration file), you would have to use the above technique. Alternatively, the GNU version of cron that comes with operating systems like Linux allows you to set environment variables in the crontab file. You can simply insert “NEWSCLIPPER=/some/path” directly before you call News Clipper. You have to give complete paths to every input and output file in the configuration. Also put the full path to your perl binary in the first line of the NewsClipper.pl file. (Using the #!/your/path/to/perl notation.) Then create a

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123