It's a bit tricky, but you can do it
Use the following in /jffs/scripts/init-start script :
Replace :
THEIDYOUWANT, by a unique ID along your cru commands
THECOMMANDYOUWANT, by the command you want to execute each last day of month (usually a shell script)
Do not forget antislashs ( \ ) in script. Test without them directly on command line
It will execute "THECOMMANDYOUWANT" each last day of the month.
THECOMMANDYOUWANT is triggered at 23:59 when the value of the next day is lower than the current day, tested between 28 & 31 (for handling february)
Use the following in /jffs/scripts/init-start script :
Code:
cru a THEIDYOUWANT "59 23 28-31 * * [[ \`date +\%d\` -gt \`date +\%d -D \%s -d \$(( \$(date +\%s) + 86400))\` ]] && THECOMMANDYOUWANT"
THEIDYOUWANT, by a unique ID along your cru commands
THECOMMANDYOUWANT, by the command you want to execute each last day of month (usually a shell script)
Do not forget antislashs ( \ ) in script. Test without them directly on command line
It will execute "THECOMMANDYOUWANT" each last day of the month.
THECOMMANDYOUWANT is triggered at 23:59 when the value of the next day is lower than the current day, tested between 28 & 31 (for handling february)