New answers tagged

0 votes

How to schedule a biweekly cronjob?

This variant on date with %U and %V doesn't suffer from the year wraparound errors that they do. 0 0 * * 3 [[ $( expr $(date +%s) / 604800 ) % 2 ) == '0' ]] && echo "execute script"
Jeff Hutton's user avatar
0 votes

How to have an environment variable with quotes in crontab?

As far as I could find, crontab variables just cannot have quotes and they also can't be more than 999 characters long. The answer to this question is that it's simply not possible.
Pablo Fernandez's user avatar
1 vote

How to have an environment variable with quotes in crontab?

man 5 crontab An active line in a crontab will be either an environment setting or a cron command. An environment setting is of the form, name = value where the spaces around the equal-sign (=) are ...
HBruijn's user avatar
  • 77.2k
2 votes

How to have an environment variable with quotes in crontab?

The good practice for cron is: Create script to run the commands Set variables in script. Also is possible to use external file with variables: source /path/to/file/with/variables Use full path to ...
Romeo Ninov's user avatar
  • 5,318

Top 50 recent answers are included