crontab entry to run a script on 1st of every month.

What should be the crontab entry in solaris to run a script on 1st of every month?

Is this correct?

 
00 02 1 * * <script to be executed>

From the man page for crontab:

So yes (at 2am).

1 Like

then what is below mentioned entry showing? when will it run?

 
00 02 1 * 1 <script to be executed>

This will run on the first day of the month if that day is also a Monday.

It means it won't run at all if first day of the month is not a Monday.

---------- Post updated at 08:05 AM ---------- Previous update was at 07:52 AM ----------

Conclusion:-

So, this entry will run the script on 1st of every month.

00 02 1 * * <script to be executed>

wherein this will run it if 1st day of the month is also a Monday. Otherwise it won't run.

 00 02 1 * 1 <script to be executed> 

@ 2:00 Hrs